CS134b
Compiler Design Laboratory, 2001
Instructor:
Jason Hickey
(
yapper.org
)
Caltech Computer Science Department
Overview and administration
Course schedule and readings
Text:
OCaml book
Style:
Notes on programming style
(from Cornell CS412)
Lectures
Lecture notes from last year are below.
Introduction
Jan 3:
Course administration and intro
[
handouts
]
Jan 5:
OCaml: basic types
[
text
]
Jan 8:
Disjoint unions
[
text
]
Jan 10:
Records, arrays, refs
[
text
]
Jan 12:
The module system (and a simple implementation of
Set
)
Lexing and Parsing
[
handouts
]
Simple language:
Makefile
,
token.mlz
,
ast.mlz
,
lex.mll
,.
lex.mli
,
parse.ml
PML:
Makefile
,
set_sig.mlz
,
red_black_table.ml
,
red_black_table.mli
General:
ast.mlz
,
lex.mli
,
lex.mll
,
eval.ml
,
eval.mli
,
test.ml
Recursive descent:
parse.ml
,
parse.mli
YACC:
yacc.mly
(
yacc.mli
)
IR Transformations
IR
[
handouts
]
CPS Transformation
[
handouts
]
Aggregate and escape analysis
[
handouts
]
Closure conversion
[
handouts
]
Optimization
Dead-code elimination
[
handouts
]
Function inlining, constant folding, common-subexpression elimination
[
handouts
]
Back-end
Abstract Assembly Language
[
handouts
]
Revisiting ESC analysis (fixed-size closures)
[
handouts
]
Instruction selection
[
handouts
]
Liveness Analysis
[
handouts
]
Register allocation
[
handouts
]
More optimization
[
handouts
]