Simone Campanoni

Tenure-track assistant professor
Department of Electrical Engineering and Computer Science
Northwestern University

EECS 322: Compiler Construction


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.

Department page


This class takes materials from two different books (listed in the syllabus) as well as a few research papers. The result is a set of slides, notes, and code. Some lectures rely on code and notes (not slides). Soon you will find the slides below; the rest of the material is available only on Canvas.
Week number First lecture Second lecture
Week 0 Welcome L1, Framework
Week 1 Parsing, From L1 to x86_64 L2, Liveness analysis
Week 2 Interference graph, Graph coloring Panels about Homework #0
Week 3 Panels about Homework #1 Impossible, L2c, Advanced graph coloring
Week 4 Panels about Homework #2 L3, Back-end missing pieces
Week 5 Panels about Homework #3 IR
Week 6 Panels about Homework #4 An alternative register allocator: puzzle solving
Week 7 LA Panels about Homework #5
Week 8 LB Panels about Homework #6 and #7
Week 9 Research compiler Competition!

Hall of Fame

Students design and build a complete compiler able to translate an almost-C language to Intel x86-64 machine code. At the end of the class, the resulting compilers compete and the names of the students that designed and built the best compilers are reporeted below.
Year Name Picture
2017 Zhiping Xiu Hall of fame 2017

LinkedIn profile LinkedIn Follow SimoneCampanoni on Twitter Twitter