CS 744 - Advanced Compiler Design (Spring 2011)
General
- Organizational meeting:
- Tuesday, May 3rd, 2011, 1:00 -- 2:20, MC 2036A
- Lectures:
- Tuesdays and Thursdays, 1:00 -- 2:20, MC 2036A
- Web page:
- http://plg.uwaterloo.ca/~olhotak/cs744
- Instructor:
- Ondřej Lhoták, olhotak@plg, DC 2520
- Office hours:
- TuTh 2:30 -- 3:30, DC 2520, or by appointment
- Handbook description:
- http://www.cs.uwaterloo.ca/grad/courses/calendar/cs744
Important dates:
Slides from lectures
- Introduction: optimization in general, intermediate representations, static analysis in general
- Dataflow analysis
- Soot
Liveness analysis example:
- Redundancy Optimizations
- Dominance
- Static Single Assignment Form
- Global Value Numbering
- Loop Optimizations
- Partial Redundancy Elimination
- Register Allocation
Register allocation on SSA form:
- Instruction Scheduling
Recommended References
- Appel, A., Modern Compiler Implementation in Java (or
ML, or C), Cambridge University Press, 2002.
- Cooper, K., Torczon, L., Engineering a Compiler,
Morgan Kaufmann, 2004.
- Muchnick, S., Advanced Compiler Design and
Implementation, Morgan Kaufmann, 1997.
- Aho, A., Lam, M., Sethi, R., Ullman, J., Compilers: Principles, Techniques, & Tools,
Addison Wesley, 2007.
Course Outline
- Introduction, compiler architecture, intermediate representations
- Control flow analysis, control-flow graphs, basic blocks
- Dataflow analysis
- SSA form, global value numbering
- Redundancy optimizations (constant folding, CSE, PRE)
- Loop optimizations
- Code generation, instruction scheduling, peephole optimizations
- Register allocation
- Pointer and alias analysis
- Interprocedural dataflow analysis
- Procedure optimizations
- Additional topics (tentative):
- Memory management, escape analysis, garbage collection
- Dynamic (JIT) compilation
- Program analysis in software development tools
Evaluation
Assignments: | 3 * 10% |
Reading assignments: | 10% |
Course Project: | |
- proposal: | 10% |
- final report: | 30% |
- presentation: | 20% |
Assignments
There will be three short assignments to give you a chance to apply
the lecture material. Assignments will have some
written and some programming problems.
Readings
Throughout the course, I will assign several research papers for you to
read. For each paper, you will submit a brief summary (one-page maximum)
of the paper in your own words. Each reading assignment will be marked on
a pass/fail basis.
Course Project
The course project gives you a chance to explore a specific area of
compiler implementation in more depth. You will be required to implement some compiler feature, and perform an experimental evaluation
of your implementation. You may do your implementation
within any freely-available compiler infrastructure (e.g.
Soot,
JikesRVM,
Wala,
LLVM,
Scala,
gcc,
Eclipse,
abc,
SUIF,
etc.)
You will report on your project in a paper in the style of a PLDI
research paper (approx. 10 pages), and give an overview of your project
in a 21-minute presentation to the class (plus 5 minutes for questions).
LaTeX and MS Word
templates for the PLDI paper format are available from SIGPLAN.
Presentation Schedule
- Tuesday, July 12th, MC 2036A
- A 1:00 -- 1:21: Nicholas Ormrod: Effect System for Scala
- B 1:26 -- 1:47: Clara Forero: COBOL front-end for LLVM
- C 1:52 -- 2:13: Samaneh Navabpour: Adaptive Sampling-Based Monitor for Runtime Verification
- Thursday, July 14th, MC 2036
- D 1:00 -- 1:21: Sean Nyman: Dynamic Scala Optimizations in the Jikes RVM
- E 1:26 -- 1:47: Chen Liu: Statically checked C++ annotations
- F 1:52 -- 2:13: Jonathan Rodriguez: Language-Level Actors and Asynchronous Calls
- G 2:18 -- 2:39: Summarizing Method Side Effects for Interprocedural Analysis
- Tuesday, July 19th, MC 2036
- I 1:00 -- 1:21: Sarah Pidcock: Value Range Propagation for LLVM
- J 1:26 -- 1:47: Kartikaya Gupta: Dynamic Purity Detection in Javascript
- K 1:52 -- 2:13: Sina Gholamian: Faulty Instruction Replacement for MIPS LLVM Backend
- L 2:18 -- 2:39: Baiyu Li: Mixing type checking and symbolic execution in LLVM
- M 2:44 -- 3:05: Yaoqiang Li: Can R do better scalar computations in loops?
- Thursday, July 21st, MC 2036
- N 1:00 -- 1:21: Alex Szlavik: Automating DUCK (reducing operating system mode switches)
- O 1:26 -- 1:47: Kacper Bak: Optimized Translation of Clafer Models to Alloy
- P 1:52 -- 2:13: Divam Jain: Elimination of Bounds Checking in Jato VM
- Q 2:18 -- 2:39: Tarek Chammah: Register allocation for devolved architectures
- R 2:44 -- 3:05: Laura Inozemtseva: Register allocation in the OpenJDK JVM