This course covers advanced topics in compiler design: SSA intermediate representation and its use in optimization, just-in-time compilation, profile-based compilation, exception handling in modern programming languages.
Objective
Understand translation of object-oriented programs, opportunities and difficulties in optimizing programs using state-of-the-art techniques (profile-based compilation, just-in-time compilation, runtime system interaction)
Content
This course builds conceptually on Compiler Design (a basic class for advanced undergraduates), but this class is not a prerequisite. Students should however have a solid understanding of basic compiler technology.
The focus is on handling the key features of modern object-oriented programs. We review implementations of single and multiple inheritance (incl. object layout, method dispatch) and optimization opportunities.
Specific topics: intermediate representations (IR) for optimizing compilers, static single assignment (SSA) representation, constant folding, partial redundancy optimizations, profiling, profile-guided code generation. Special topics as time permits: debugging optimized code, multi-threading, data races, object races, memory consistency models, programming language design. Review of single inheritance, multiple inheritance, object layout, method dispatch, type analysis, type propagation and related topics.
This course provides another opportunity to explore software design in a medium-scale software project.
Literature
Aho/Lam/Sethi/Ullmann, Compilers - Principles, Techniques, and Tools (2nd Edition). In addition, papers as provided in the class.
Prerequisites / Notice
A basic course on compiler design is helpful but not mandatory. Student should have programming skills/experience to implement an optimizer (or significant parts of an optimizer) for a simple object-oriented language. The programming project is implemented using Java.
Performance assessment
Performance assessment information (valid until the course unit is held again)
Repetition only possible after re-enrolling for the course unit.
Additional information on mode of examination
The grade for the course is determined by your participation in one semester-long project. Usually, the team for a project consist of two students; other arrangements (e.g. in case of anticipated (e.g. civil or military service) or unanticipated (e.g. illness) absences) require the instructor's approval.
The grade for the project is determined by a grade for the project proposal (15%), review of background (15%), project design and evaluation (30%), final report (30%), and participation in discussions/critiques/reviews (10%). All these items may include a presentation that contributes to the grade.
Last cancellation/deregistration date for this graded semester performance: November 15! Please note that after that date no deregistration will be accepted and a "no show" will appear on your transcript.