Modern Compiler Implementation in ML
This new, expanded textbook describes all phases of a modern compiler: lexical analysis, parsing, abstract syntax, semantic actions, intermediate representations, instruction selection via tree matching, dataflow analysis, graph-coloring register allocation, and runtime systems. It includes good coverage of current techniques in code generation and register allocation, as well as functional and object-oriented languages, that are missing from most books. In addition, more advanced chapters are now included so that it can be used as the basis for two-semester or graduate course. The most accepted and successful techniques are described in a concise way, rather than as an exhaustive catalog of every possible variant. Detailed descriptions of the interfaces between modules of a compiler are illustrated with actual C header files. The first part of the book, Fundamentals of Compilation, is suitable for a one-semester first course in compiler design. The second part, Advanced Topics, which includes the advanced chapters, covers the compilation of object-oriented and functional languages, garbage collection, loop optimizations, SSA form, loop scheduling, and optimization for cache-memory hierarchies.
|
Contents
Lexical Analysis
|
14 |
Parsing
|
38 |
Abstract Syntax
|
87 |
Semantic Analysis
|
103 |
Activation Records
|
124 |
Translation to Intermediate Code
|
148 |
Basic Blocks and Traces
|
173 |
Instruction Selection
|
186 |
Functional Programming Languages
|
309 |
Polymorphic Types
|
344 |
Dataflow Analysis
|
377 |
Loop Optimizations
|
404 |
Static SingleAssignment Form
|
427 |
Pipelining and Scheduling
|
468 |
The Memory Hierarchy
|
492 |
Tiger Language Reference Manual
|
512 |
Liveness Analysis
|
211 |
Register Allocation
|
228 |
Putting It All Together
|
258 |
ObjectOriented Languages
|
293 |
522 | |
531 | |
Other editions - View all
Common terms and phrases
abstract syntax algorithm argument array Assem assembly language assignment basic blocks BINOP cache CJUMP coalescing color compiler compute CONST copy copy propagation cycle data structure dataflow dataflow analysis declaration definition delete depth-first depth-first search descriptor dominance frontier dominator edge error ESEQ evaluation example executed exp exp fetch field Figure flow graph formal parameter functional programming garbage collection goto L1 grammar implement induction variable inline expansion input integer iteration label let function lexical analyzer liveness analysis loop loop-invariant machine Maximal Munch memory module move instructions munchExp nested node nonterminal optimizations parse tree parser parsing table Poly-Tiger polymorphic precolored prefetch programming language record recursive register allocation regular expressions representation result RPAREN scheduling semantic actions shift spill statement static link string symbol t₁ TEMP temporary tile tion token Translate tree type-checking Worklist