$ Revised: Tue Dec 3 2002 by firstname.lastname@example.org
This is a graduate course on the design and implementation of
optimizing compilers for modern programming languages and
computer architectures. The use of compiler generation
tools and algorithms for tree and graph
based representations of programs are emphasized in this course.
A substantial compiler construction project is the principal
assignment in this class.
Additional course information and Syllabus
- (For Tue 11/19) Appel, Ch. 19, Secn 19.3, 19.6 Optimization
using SSA form and converting back from SSA form.
(pp 455 - 463, 466 - 468)
- (For Thu 11/14) Appel, Ch. 19, Secn 19.1 Converting to SSA form
(pp 437 - 447)
- (for Tue 11/12) Appel, Ch. 14 Object-Oriented Languages
(pp 303 - 317).
- (for Thu 11/7) Appel Ch 12. Putting it all together (pp 268 - 272)
- (for Tue 11/5) Appel Ch 11. Register Allocation (pp 238-265)
- (for Tue 10/29) Appel Ch. 10. Liveness Analysis (pp 222-236)
- (for Thu 10/24) finish Appel Ch. 9. (pp 206 - 220)
- (for Tue 10/22) Appel Ch. 9, Secn 9.1 Instruction selection
(pp 195 - 206)
- (for Tue 10/15) Appel Ch. 8 Linearization of the IR (pp 181 - 194)
- (for Thu 10/10) Appel Ch. 7 Translation to IR (pp 155 - 180)
- (for Tue 10/8) finish Appel Ch. 6, Secn 6.2 Frames (pp 140 - 154)
- (for Thu 10/3) Appel Ch. 6, Activation records, secn 6.1
(pp 130 - 140)
- (for Tue 10/1) Finish Appel Ch. 5, secns 5.3, 5.4 on
type checking (pp 119 - 129)
- (for Thu 9/26) Appel Ch. 5, secns 5.1, 5.2 symbol tables and
bindings (pp 109 - 119)
- (for Tue 9/24) Appel Ch.4 Abstract Syntax (pp 89 - 106)
- (for Tue 9/17) Finish Appel Ch. 3, secns 3.4 - 3.5 on parser
generators and error recovery (pp 70 -84).
- (for Tue 9/10) Appel Ch. 3, secn 3.3 BU parsing (pp 57 - 70).
- (for Thu 9/5) Appel Ch. 3, secns 3.1 - 3.2 grammars and TD parsing
(pp 40 - 57).
- (for Thu 8/29) Finish Appel Ch.2 (pp 16 - 39).
- (for Tue 8/27) Read as much of Appel Ch. 2 (pp 16 - 39) as
possible, but at least through secn 2.3 (pp 16 - 24).
- (for Thu 8/22) Read Appel Ch. 1 and try the programming exercise
described starting on page 11. Consider using Java's
Hashtable class as a static member of the class Nonterm,
instead of the Table class described.
If you do not have the text yet, you can
pdf version of Chapter 1
(local access only).
Exercises and assignments
- (Due Tue Dec 3) Two problems:
- Design a set of dataflow equations to determine the dominator
relations in a control flow graph. Give a procedure to
construct the dominator tree from the relations computed
by your dataflow equations.
- Exercise 19.7 on page 475 of Appel.
Note that the second block in a topological ordering of this graph
is mislabeled as 3 when it should be 2. Also note
that the control
flow edges from block 5 are missing their condition labels.
The most sensible labeling is that the edge to block 6 is taken on
condition true, and the edge to block 7 is taken on condition false,
although it really shouldn't matter for this problem (the uselessness
of the second loop in the alternate labeling might be recognized
with a conditional value numbering analysis).
Note You must combine all phi-functions at the start of a
basic block into a single simultaneous assignment in order to
be generate the correct interference graph.
- (Due Tue Oct 22) Parsing assignment
- (Due Thu Sep 5) A short assignment
about generated scanners.
- The project now has its own page.
- Randy Allen and Ken Kennedy, Optimizing Compilers
for Modern Architectures: A Dependence-based Approach,
Morgan Kauffman, 2001. ISBN: 1-558-60286-0
- Andrew W. Appel, Modern Compiler Implementation in Java,
Cambridge University Press, 1998. ISBN: 0-521-58388-8
- Robert Morgan, Building an Optimizing Compiler,
Butterworth-Heinemann, 1998. ISBN: 01-55558-179-X
- Robert P. Wilson, Robert S. French, Christopher S. Wilson,
Saman P. Amarasinghe, Jennifer M. Anderson,
Steve W. K. Tjiang, Shih-Wei Liao,
Chau-Wen Tseng, Mary W. Hall,
Monica S. Lam, and John L. Hennessy,
SUIF: An Infrastructure for Research on Parallelizing
and Optimizing Compilers, 1994.
This page is maintained by
Send mail if you find problems.