Engineering a CompilerThe proliferation of processors, environments, and constraints on systems has cast compiler technology into a wider variety of settings, changing the compiler and compiler writer's role. No longer is execution speed the sole criterion for judging compiled code. Today, code might be judged on how small it is, how much power it consumes, how well it compresses, or how many page faults it generates. In this evolving environment, the task of building a successful compiler relies upon the compiler writer's ability to balance and blend algorithms, engineering insights, and careful planning. Today's compiler writer must choose a path through a design space that is filled with diverse alternatives, each with distinct costs, advantages, and complexities. Engineering a Compiler explores this design space by presenting some of the ways these problems have been solved, and the constraints that made each of those solutions attractive. By understanding the parameters of the problem and their impact on compiler design, the authors hope to convey both the depth of the problems and the breadth of possible solutions. Their goal is to cover a broad enough selection of material to show readers that real tradeoffs exist, and that the impact of those choices can be both subtle and far-reaching. Authors Keith Cooper and Linda Torczon convey both the art and the science of compiler construction and show best practice algorithms for the major passes of a compiler. Their text re-balances the curriculum for an introductory course in compiler construction to reflect the issues that arise in current practice.
|
Contents
1 Overview of Compilation | 1 |
2 Scanning | 27 |
3 Parsing | 73 |
4 ContextSensitive Analysis | 151 |
5 Intermediate Representations | 209 |
6 The Procedure Abstraction | 251 |
7 Code Shape | 307 |
8 Introduction to Code Optimization | 383 |
10 Scalar Optimizations | 491 |
11 Instruction Selection | 545 |
12 Instruction Scheduling | 585 |
13 Register Allocation | 619 |
ILOC | 659 |
Data Structures | 673 |
Exercises | 725 |
779 | |
Other editions - View all
Common terms and phrases
algorithm analysis array assignment attribute grammar basic block bottom-up branch Chapter compiler writer complex computation context-free grammars control-flow copy cost create cycle data-flow data-flow analysis definition edge efficient eliminate encode evaluation example execution Expr expression Figure function global graph handle hash ident ILOC implementation induction variable input insert instruction selection integer iteration label left recursion lexical live ranges load loadI loop memory method multiple name space node Ø Ø offset operands operations optimization parameter parse tree parser path peephole optimizer perform pointer problem procedure processor produce programming languages rarp reduce redundant reference register allocation regular expression requires result rewrite rules run-time scanner scheme scope Section sequence SheepNoise SIGPLAN SIGPLAN Notices simplify single specific spill SSA form stack Stmt string structure symbol table syntax target machine techniques terminal symbols tion transformations value numbering worklist
Popular passages
Page 723 - Robert P. Wilson and Monica S. Lam. Efficient context-sensitive pointer analysis for C programs.