Skip to content

CS426

CS426 (Compiler Construction) is a 3 (undergrad) or 4 (grad) credit hour course that fulfills an Advanced Computing requirement for Computer Engineering majors. It is offered only in the fall semester.

Content Covered

This course teaches both the theory behind compilers and optimizations, as well as practical ways to implement them.

Theory

  • Ambiguous Grammars
  • LR, LL, and Recursive Descent Parsing
  • Intermediate Representations
  • SSA Form
  • Dominator Trees
  • Optimizations
  • Dataflow Analysis
  • Code Generation
  • Register Allocation
  • Instruction Scheduling

Construction

  • LLVM IR and C++ API
  • Inheritance and Polymorphism
  • Virtual Tables
  • Symbol Tables
  • Fuzzing
  • Garbage Collection
  • Linkers, Libraries, and Runtimes

Prerequisites

CS426 has only one official prequisite, CS421. It is possible to get an override for this pre-requisite, and necessary content from 421 is small and is reviewed in class.

When to Take it

For CompE students focusing on architecture or systems programming, it may be helpful to take this class to better understand the role compilers plays in these fields.

Course Structure

Lecture

CS426 has two lectures a week, Wednesday and Friday for 1:20 each. In the Fall 2023 semester, this class was also offered as part of the City Scholars program, so Friday lectures were in Chicago and offered on Zoom.

MPs

CS225 has 4 Machine Projects typically due every 3-4 weeks. MP1-MP3 all involve implementing a compiler for an educational object-oriented known as COOL. In the Fall 2023 semester, these were: - MP1: Lexer and Parser for COOL - MP2: Basic code generation for COOL - MP3: Object oriented code generation for COOL - MP4: Register Allocation pass using LLVM.

MP3 takes a very long time to complete and is very difficult to debug. Most of the time spent on these MPs is understand the provided code and APIs that are given to you. Go to office hours early for clarification.

Exams

CS426 has one midterm and one final, both given in class during normal lecture time. This means the final is given before the final exam period starts.

Instructors

Instructors for this course include Vikram Adve or Sasa Misailovic. Both are good professors with lots of experience in the topic.

Course Tips

  • CS426 offers up to 20% extra credit for each MP, usuaully involving building extra functionality on top of the base MP. This can be very useful for ensuring a good grade, even if the midterm or final goes poorly.
  • Starting early and working at a steady pace for this class can be very helpful in ensuring your success, as leaving the MPs for the last day or few days can be a difficult task.

Life After

If you enjoyed this class, take CS526 - Advanced Compiler Construction. Some of the topics covered in CS426 such as lattice theory can be applied to other subjects, such as ECE 462 - Logic Synthesis

Infamous Topics

  • MP3: MP3 is 3-4 times more difficult than the other MPs in this class. It can easily catch you off guard with the amount of time it takes to complete. Be sure to start early.

Resources