Modern Compiler Implementation in Java
Modern Compiler Implementation in ML
Modern Compiler Implementation in C
©1998 by Andrew W. Appel
Contents:
Part I. Fundamentals of Compilation
- Introduction
- Modules and interfaces
- Tools and software
- Data structures for tree languages
- Lexical Analysis
- Lexical tokens
- Regular expressions
- Finite automata
- Nondeterministic Finite Automata
- Lexical analyzer generators
- Parsing
- Context-free grammars
- Predictive Parsing
- LR Parsing
- Using parser generators
- Parser error recovery
- Abstract Syntax
- Semantic actions
- Abstract parse trees
- Type Checking
- Symbol tables
- Bindings for the Tiger compiler
- Type-checking expressions
- Type-checking declarations
- Activation Records
- Stack frames
- Frames in the Tiger compiler
- Translation to Intermediate Code
- Intermediate representation trees
- Translation into trees
- Declarations
- Basic Blocks and Traces
- Canonical trees
- Taming conditional branches
- Instruction Selection
- Algorithms for instruction selection
- CISC machines
- Instruction selection for the Tiger compiler
- Liveness analysis
- Solution of dataflow equations
- Liveness in the Tiger compiler
- Interference graph construction
- Register allocation
- Coloring by simplification
- Coalescing
- Graph coloring implementation
- Register allocation for trees
- Putting it all together
Part II. Advanced Topics
- Garbage collection
- Mark-and-sweep collection
- Reference counts
- Copying collection
- Generational collection
- Incremental collection
- Baker's algorithm
- Interface to the compiler
- Object-oriented languages
- Classes
- Single inheritance of data fields
- Multiple inheritance
- Testing class membership
- Private fields and methods
- Classless languages
- Optimizing object-oriented programs
- Functional Programming Languages
- A simple functional language
- Closures
- Immutable variables
- Inline expansion
- Closure conversion
- Efficient tail recursion
- Lazy evaluation
- Polymorphic Types
- Parametric polymorphism
- Type inference
- Translation to intermediate code
- Resolution of static overloading
- Dataflow Analysis
- Intermediate representation for flow analysis
- Various dataflow analyses
- Transformations using dataflow analysis
- Speeding up dataflow analysis
- Alias analysis
- Loop Optimizations
- Dominators
- Loop-invariant computations
- Induction variables
- Array bounds checks
- Loop unrolling
- Static Single-Assignment Form
- Converting to SSA form
- Efficient computation of the dominator tree
- Optimization algorithms using SSA
- Arrays, pointers, and memory
- The control-dependence graph
- Converting back from SSA form
- Scheduling and Pipelining
- Loop scheduling without resource bounds
- Resource-bounded loop pipelining
- Branch prediction
- Memory Hierarchies
- Cache organization
- Cache-block alignment
- Prefetching
- Loop interchange
- Blocking
- Garbage collection and the memory hierarchy
- Appendix: Tiger Language Reference Manual
- Lexical issues
- Declarations
- Variables and expressions
- Standard library
- Bibliography
- Index