Compilers are a critical component of any system as they are responsible for translating programs written in high-level languages and frameworks (source code) to optimized and correct machine-language executables (target code, in general). Compilers do this by: first parsing and analyzing the high-level source code; lowering that code into an intermediate representation; performing a series of code transformation passes on the intermediate representation to optimize the code for myriad goals, including performance, efficiency, reliability, security, etc.; and finally generating code for the target.
The purpose of this class is to examine the design and implementation of an optimizing compiler. You will learn about programming language representation, common transformations, analyses, and optimizations, intermediate languages, and design choices in lecture and will learn about the software engineering challenges of implementing a compiler and simple runtime support for an imperative, object-oriented language in programming labs. We will use the Classroom Object-Oriented Language (COOL) and the LLVM compiler framework, which is commonly used also in industry. The emphasis in this course is on code transformations and optimization.
Program compilation and translation from high-level into machine languages. Compiler structure; syntax analysis; semantic analysis; type systems; code generation; intermediate language and representation; control and data flow analysis; optimization techniques.
ECE306 (or EE306) or ECE306H (or EE306H) or CS429 or CS429H, and ECE312 (or EE312) or ECE312H (or EE312H) or CS312 or CS312H with a grade of at least C- in each.
You should understand how a computer fundamentally works so that you understand how to target it with a compiler (i.e., machine language, ISA, register, memory, assembly, the stack, function calls, etc.). You should also have mastered high-level programming and concepts, in particular writing code in C++ including basic object-oriented programming concepts.
The class involves building on a large existing compiler infrastructure codebase (LLVM and Cool language) with a corresponding learning curve. I expect the workload to be on the heavier side, perhaps similar to 460N and 461S. This is only the third time the course is offered and the first time I am teaching it, and we are making continuous adjustments and improvement based on prior experiences and feedback.
No required textbook, but either of the following books provides good coverage of the main topics of the course (and beyond). You may find you do not need a textbook, but you are very unlikely to need both. The first is very popular.
|
![]() |
|
![]() |
After successfully completing the course, students will be able to:
Tentative list of course topics (see class schedule for details):
Up to seven written homework assignments will be required. Written
assignments will not be accepted late, but homeworks will only be checked
for completeness and we will not include your lowest assignment grade (for
one assignment) when computing your final grade.
Five programming labs and one set-up lab will be required. The programming labs are arguably the highlight of the course as they build on one another to form a working compiler:
Programming labs will be 2-3 weeks per lab with weekly checkpoints, each
with the same point value. All labs will include a final lab "checkout",
which will be a short oral review of your work with the TA. We will accept
late submissions of programming labs with a penalty. The specific penalty
for late submission will be described in each lab assignment.
We recommend for setup Lab 0 to be done individually, but all programming
labs should be performed with a partner (teams of 2). The lab partnerships
must be registered with your TA during the Lab 0 period. Once registered,
the partnership will continue and can only be dissolved in exceptional
circumstances after discussion with the instructor and TA. It is expected
that both partners will contribute to all aspects of each lab, and all
partners are expected to be present during the checkout.
Actively participating in lectures is crucial to achieving the learning
objectives. Class attendance will be used for deciding grades in
borderline cases.
You will have opportunities for earning extra credit for this class.
Extra-credit will be through, possibly several, opportunities to implement
more-sophisticated analyses or optimization techniques related to the
programming labs. No other extra credit will be possible.
Nothing about your studies in general and this course in particular warrants unethical behavior. We take this seriously and encourage you to remind yourself of the University's Code of Conduct.
With respect to this course, the following are some specific, yet incomplete examples. You are not to copy solutions from any source (including, but not limited to, books, people, old class notes or handouts, or information found anywhere on the internet, including generative AI). While the pressures of many classes, homeworks, work and/or extracurricular activities can be great, this is never an excuse for copying solutions from others. "Helping" somebody by allowing them to "borrow" your solution is not doing them a favor either, but indicates your approval and active participation in such unethical behavior. Refer to the University Code regarding academic integrity. If you are aware of any breach of academic integrity, it is your responsibility to report it to the instructors.
By contrast, studying together and discussing your problems with other students is encouraged and even highly recommended. This means asking someone to look at parts of your code to give you advice, asking them for suggestions when you face an obstacle, working out example exercises together that are not on an assigned homework, or just discussing any aspect of the material. What you may not do is to copy or in any way use code or homework solutions written by anyone (or anything) else or communicated to you by any means. As responsible adults, you can draw the distinction between cheating and honest behavior: exercise your judgment and try to preserve the highest level of professional integrity in everything you do. If you are unsure about some behavior, ask us before - apologies after will not help you.
Bottom line: You may discuss difficulties with others and get
occasional help with debugging but you must write your code entirely by
yourself. Cheating will not be tolerated and will be dealt with
according to the policy established by the Office of the Dean of
Students.
Sharing of course materials is prohibited. No materials used in this class, including, but not limited to, lecture hand-outs, videos, assessments (quizzes, exams, papers, projects, homework assignments), in-class materials, review sheets, and additional problem sets, may be shared online or with anyone outside of the class unless you have my explicit, written permission. Unauthorized sharing of materials promotes cheating. It is a violation of the University's Student Honor Code and an act of academic dishonesty. The University is well aware of the sites used for sharing materials, and any materials found online that are associated with you, or any suspected unauthorized sharing of materials, will be reported to Student Conduct and Academic Integrity in the Office of the Dean of Students. These reports can
result in initiation of the student conduct process and include charge(s) for
academic misconduct, potentially resulting in sanctions, including a grade
impact.
Class recordings are reserved only for students in this class for educational purposes and are protected under FERPA. The recordings should not be shared outside the class in any form. Violation of this restriction by a student could lead to Student Misconduct proceedings.
Religious holy days sometimes conflict with class and examination
schedules. If you miss a class, examination, work assignment, or other
project due to the observance of a religious holy day you will be
given an opportunity to complete the work missed within a reasonable
time after the absence. By UT Austin policy, you must notify each of your instructors of your pending absence for a religious holy day as far in advance
as possible of the date of observance. For questions regarding religious
accommodations, please contact the Office
of the Dean of Students.
For a list of other important university policies and helpful resources that
you may need as you engage with and navigate your courses and the university,
see the University
Policies and Resources Students Canvas page. The page includes the
language of the University Honor Code, Title IX legal requirements for Texas
employees, and information about how to receive support through the office of
Disability & Access.
Contents © Copyright 2025 Andreas Gerstlauer | http://users.ece.utexas.edu/~gerstl/ece479k_f25 |