EECS 322 - Compiler Construction
CATALOG DESCRIPTION: The compiler is the programmer's primary tool. Understanding the compiler is therefore critical for programmers, even if they never build one. Furthermore, many design techniques that emerged in the context of compilers are useful for a range of other application areas. This course introduces students to the essential elements of building a compiler: parsing, context-sensitive property checking, code linearization, register allocation, etc. To take this course, students are expected to already understand how programming languages behave, to a fairly detailed degree. The material in the course builds on that knowledge via a series of semantics preserving transformations that start with a fairly high-level programming language and culminate in machine code.
- This course satisfies the project requirement.
COURSE COORDINATOR: Prof. Robby Findler
SYLLABUS, organized by the week of the quarter:
1-2: Intro; lambda-lifting & closure conversion
3-4: Translation to a lower-level intermediate representation (significant simplification the language for subsequent parts of the compiler)
5-6: Optimization (computing the fixed point of a few simple transformations like function inlining and constant propagation)
7: Instruction scheduling (a tree tiling problem, to match the fairly generic lower-level representation to a specific processor's instructions)
8-9: Register allocation (graph coloring)
10: Code walks
GRADES: Grades will primarily be based on codewalks at the end of the quarter, but also based on intermediate projects. This course is programming project heavy.
COURSE OBJECTIVES: Students that complete this course should:
- understand how to efficiently implement a programming language,
- have an accurate performance model for the primitives in a programming language,
- have a good sense for the kind of assembly code that a compiler produces
- be able to maintain and extend a compiler for a programming language