Compiler Construction

Fall 2023 Edition



This class examines the design and implementation of an optimizing compiler. Students will learn about common optimizations, intermediate languages, and design choices in lectures. Students will learn about the software engineering challenges of implementing a compiler for an imperative, object-oriented language in machine problems.

The class is going to be hybrid, between our Urbana and Chicago locations. Each week, we will have one lecture in-person in Urbana (Wednesdays) and Chicago (Fridays). The students in the opposite location will be able to follow the Zoom stream on-line. We will post the class Zoom link on Piazza.

 

News  

  • 9/01/2023: Midterm tenative date: Wed 10/18 during the lecture.

  • 9/01/2023: MP1 has been released on Piazza.

  • 8/23/2023: Piazza is set up. It contains the Zoom link for the lectures.

  • 8/20/2023: The website is up!


Lectures:
Wednesday (Urbana) and Friday (Chicago)
12:30pm-13:45pm
Everitt 1302 or Online: See Piazza for the link

Instructor:
Sasa Misailovic
Associate Professor
Computer Science, UIUC
4110 Siebel Center misailo@illinois.edu
Office hours: after class (Wed Urbana; Fri Chicago)

Teaching Assistant:
Yifan Zhao
yifanz16@illinois.edu
Office hours: Wednesday 3pm (SC 3rd floor; near small elevator)

Overview  

Students will complete two homeworks and four machine problems throughout the course. Students who take the 4-unit version of the course also have to complete a fifth machine problem. There will also be two quizzes -- at the mid-semester and at the end. Each machine problem will build on the previous one, so it is expected that students will write maintainable, reusable, and well-documented code for assignments. The course will be similar in content (and partially in presentation) to the Fall 2022 version.

We will compute the final grade using the following table:

Activity Grade 3-credit Grade 4-credit Notes
Programming Assignment (MPs 1-4) 50% 39% The core programming project will be in four parts, and will be graded as the semester progresses. The project weights are 15 (MP1), 25 (MP2), 30 (MP3), and 30 (MP4) out of total project points.
Unit Project (MP5) 0% 22% Only 4-credit-hour students do the unit project. It is mandatory for their grade.
Mid-term Quizz 20% 16% Tentative date: October 18 during lecture.
Final Quizz 30% 23% We plan it for the last day of classes.
Extra Credit 10% 10% We will give additional assignments on the projects (they will together scale up to 10% of the total grade).

We will assign the letter grade based on their number of points on a 100-point scale (i.e. we don't do prior grading-on-the-curve).

More details about the course administration and grading policies are available here.

 

Tentative Schedule  


Date Topic Notes
8/23

Introduction


Slides
8/25

Review of Lexing and Parsing


Slides
8/30

Review of Parsing


Slides
9/1

Parsing, Testing, and Intermediate Representations

MP1 out (see Piazza).

Slides
9/6

Intermediate Representations (AST and CFG)


Slides
9/8

Intermediate Representations (CFG and SSA)


Slides
9/13

Intermediate Representations (SSA)


Slides
9/15

Intermediate Code Generation

MP1 deadline. MP2 releasedo ver the weekend.

Slides
9/20

Intermediate Code Generation


Slides
9/22

Runtime Environments


Slides
9/27

Runtime Environments


Slides
9/29

More on Code Generation


Slides
10/4

More on Code Generation


Slides
10/6

More on Code Generation

MP2 deadline. MP3 released over the weekend.

Slides
10/11

Optimization Basics


Slides
10/13

Optimization Basics


Slides
10/18

Midterm Quiz (in-class)


10/20

Dataflow Analysis

MP5 (Unit Project) released.

Slides
10/25

Dataflow Anaysis


Slides
10/27

Dataflow Analysis


Slides
11/1

Register Allocation


Slides
11/3

Register allocation

MP3 deadline. MP4 released over the weekend.

Slides
11/8

Instruction Scheduling


Slides
11/10

Instruction Scheduling


Slides
11/15

Procedure-level Optimization


Slides
11/17

Procedure-level Optimization


Slides
11/22

No Class Day (University Holiday)


11/24

No Class Day (University Holiday)


11/29

Advanced Compiler Topics (TBD)


12/1

Compilers in the World of Machine Learning

MP4 deadline.

12/6

Final Quiz (in class)

MP5 official deadline.

Topics we will cover:

  • Lexing and Parsing Review
  • Intermediate Program Representations (AST, CFG, 3-address code, SSA)
  • Runtime Environment
  • Code Generation (imperative fragment, object oriented fragment)
  • Register Allocation
  • Instruction Scheduling
  • Program Optimization (Local, Dataflow, Global)