COMP 412: Compiler Construction for Undergraduates
Keith Cooper
Linda Torczon
Department of Computer Science
Rice University
Houston, Texas, USA
Fall 2016: Room 301, Sewall Hall Monday, Wednesday, Friday, 11:00am

Notes


Slides and/or Notes

  1. Introduction to the Course

  2. The Compiler's Front End   (a lab 1 perspecitive)
  3. Local Register Allocation   (a lab 1 perspective)
  4. Lab 1: Tutorial 1 Notes
  5. The ILOC Virtual Machine (more Lab 1 help)
  6. Lab 1: Tutorial 2 Notes   <== NEW

  7. Lexical Analysis, Part I   (Chapter 2 in EaC2e)
  8. Lexical Analysis, Part II, NFAs and Thompson's Construction
  9. Lexical Analysis, Part III, the Subset Construction and Brzozowski's Algorithm for DFA Minimization
  10. Lexical Analysis, Part IV, Hopcroft's Algorithm for DFA Minimization
    Revised section on Hopcroft's algorithm from EaC3e
  11. Lexical Analysis, Part V, Implementing Scanners from DFAs  (not presented; here for reference)

  12. Syntax Analysis I    (Chapter 3 in EaC2e)
  13. Syntax Analysis II
  14. Syntax Analysis III
  15. Syntax Analysis IV    First Sets, Follow Sets, and LL(1) table    Corrected

  16. Syntax Analysis V    Start of Bottom-up Parsing (Handles)
  17. Syntax Analysis VI
  18. Syntax Analysis VII   LR(1) table construction
  19. Syntax Analysis VIII

  20. Lab 2: Tutorial Notes

  21. Intermediate Representations, I    (Chapter 5 in EaC2e)
  22. Intermediate Representations, II

  23. Syntax-Directed Translation, I    (Chapter 4 in EaC2e)
  24. Syntax-Directed Translation, II-

  25. Code Generation Preliminaries, I    (Chapters 6 & 7 in EaC2e)
    Paper mentioned in class and lecture notes:   Robert Floyd, "An Algorithm for Coding Efficient Arithmetic Operations," CACM 4(1), January 1961, pages 42-51.

  26. Code Generation Preliminaries, II    Assignment and Memory Management

    You are responsible for material above this line on the mid-term exam

    Material below this line is covered on the final exam

  27. Array & Structure Address Calculations
  28. Function & Procedure Calls
  29. Functions & Procedure Calls, II
  30. Naming in an Algol-Like Language
  31. Naming in Object-Oriented Languages
  32. Runtime Support for Algol-Like Languages

  33. Local Scheduling: A Primer for Lab 3    (Detour to Chapter 12 in EaC2e, for lab 3)
  34. Lab 3, Tutorial 1   focus on building the dependence graph
  35. Lab 3, Tutorial 2   focus on performance of scheduled code

  36. Runtime Support for Object-Oriented Languages    (back to Chapters 6 & 7 in EaC2e)
  37. Back to Expressions    strings and booleans
    Column mentioned in the lecture: Poul-Henning Kamp, "The Most Expensive One-byte Mistake", ACM Queue, July 25, 2011
  38. Storage Layout & the Memory Hierarchy    Caches, TLB, Address Translation    (corrected & expanded version)
  39. Control-Flow Structures    (corrected & expanded version)

  40. Introduction to Optimization: Local Value Numbering    (Chapter 8 in EaC2e)
  41. Eliminating Useless & Unreachable Code: DEAD and CLEAN    (Section 10.2 in EaC2e)

  42. Instruction Selection, I    (Chapter 11 in EaC2e)
  43. Selection by Tree-Pattern Matching
  44. Selection by Peephole Optimization
  45. Just-In-Time Compilers and Runtime Optimizers

  46. Scheduling Beyond Basic Blocks    Extended Basic Blocks, Superblock Cloning, Traces, Dominators    (more of Chapter 12 in EaC2e)
  47. Scheduling Beyond Traces: Software Pipelining
    See:    Monica Lam, "Software Pipelining: An Effective Scheduling Technique for VLIW Machines," PLDI 1988.
  48. Profile-Guided Code Positioning    Information on the Final Exam
    See:    Karl Pettis and Robert C. Hansen, Profile Guided Code Positioning," PLDI 1990.

Additional Materials

  1. Notes on Garbage Collection in Java
    It is hard to understand your Java lab's performance without understanding garbage collection and its impact on running times.
  2. The Software Stack
    What happens to code after compilation?

Syllabus

Fall 2016 Syllabus


Comp 412 Home Last modified Saturday, 03-Dec-2016 17:49:35 CST.