Engineering a Compiler, 2nd Edition
Read it now on the O’Reilly learning platform with a 10-day free trial.
O’Reilly members get unlimited access to books, live events, courses curated by job role, and more from O’Reilly and nearly 200 top publishers.
Book description
This entirely revised second edition of Engineering a Compiler is full of technical updates and new material covering the latest developments in compiler technology. In this comprehensive text you will learn important techniques for constructing a modern compiler. Leading educators and researchers Keith Cooper and Linda Torczon combine basic principles with pragmatic insights from their experience building state-of-the-art compilers. They will help you fully understand important techniques such as compilation of imperative and object-oriented languages, construction of static single assignment forms, instruction scheduling, and graph-coloring register allocation.
- In-depth treatment of algorithms and techniques used in the front end of a modern compiler
- Focus on code optimization and code generation, the primary areas of recent research and development
- Improvements in presentation including conceptual overviews for each chapter, summaries and review questions for sections, and prominent placement of definitions for new terms
- Examples drawn from several different programming languages
Show and hide more
Table of contents Product information
Table of contents
- Cover image
- Table of Contents
- In Praise of Engineering a Compiler Second Edition
- Front Matter
- Copyright
- Dedication
- About the Authors
- About the Cover
- Preface to the Second Edition
- Chapter 1. Overview of Compilation
- 1.1. Introduction
- 1.2. Compiler Structure
- 1.3. Overview of Translation
- 1.4. Summary and Perspective
- Chapter 2. Scanners
- 2.1. Introduction
- 2.2. Recognizing Words
- 2.3. Regular Expressions
- 2.4. From Regular Expression to Scanner
- 2.5. Implementing Scanners
- 2.6. Advanced Topics
- 2.7. Chapter Summary and Perspective
- Chapter 3. Parsers
- 3.1. Introduction
- 3.2. Expressing Syntax
- 3.3. Top-Down Parsing
- 3.4. Bottom-Up Parsing
- 3.5. Practical Issues
- 3.6. Advanced Topics
- 3.7. Summary and Perspective
- Chapter 4. Context-Sensitive Analysis
- 4.1. Introduction
- 4.2. An Introduction to Type Systems
- 4.3. The Attribute-Grammar Framework
- 4.4. Ad Hoc Syntax-Directed Translation
- 4.5. Advanced Topics
- 4.6. Summary And Perspective
- Chapter 5. Intermediate Representations
- 5.1. Introduction
- 5.2. Graphical IRS
- 5.3. Linear IRS
- 5.4. Mapping Values to Names
- 5.5. Symbol Tables
- 5.6. Summary and Perspective
- Chapter 6. The Procedure Abstraction
- 6.1. Introduction
- 6.2. Procedure Calls
- 6.3. Name Spaces
- 6.4. Communicating Values Between Procedures
- 6.6. Advanced Topics
- 6.7. Summary and Perspective
- Chapter 7. Code Shape
- 7.1. Introduction
- 7.2. Assigning Storage Locations
- 7.3. Arithmetic Operators
- 7.4. Boolean and Relational Operators
- 7.5. Storing and Accessing Arrays
- 7.6. Character Strings
- 7.7. Structure References
- 7.8. Control-Flow Constructs
- 7.9. Procedure Calls
- 7.10. Summary and Perspective
- Chapter 8. Introduction to Optimization
- 8.1. Introduction
- 8.2. Background
- 8.3. Scope of Optimization
- 8.4. Local Optimization
- 8.5. Regional Optimization
- 8.6. Global Optimization
- 8.7. Interprocedural Optimization
- 8.8. Summary and Perspective
- Chapter 9. Data-Flow Analysis
- 9.1. Introduction
- 9.2. Iterative Data-Flow Analysis
- 9.3. Static Single-Assignment Form
- 9.4. Interprocedural Analysis
- 9.5. Advanced Topics
- 9.6. Summary and Perspective
- Chapter 10. Scalar Optimizations
- 10.1. Introduction
- 10.2. Eliminating Useless and Unreachable Code
- 10.3. Code Motion
- 10.4. Specialization
- 10.5. Redundancy Elimination
- 10.7. Advanced Topics
- 10.8. Summary and Perspective
- Chapter 11. Instruction Selection
- 11.1. Introduction
- 11.2. Code Generation
- 11.3. Extending the Simple Treewalk Scheme
- 11.4. Instruction Selection via Tree-Pattern Matching
- 11.5. Instruction Selection via Peephole Optimization
- 11.6. Advanced Topics
- 11.7. Summary and Perspective
- Chapter 12. Instruction Scheduling
- 12.1. Introduction
- 12.2. The Instruction-Scheduling Problem
- 12.3. Local List Scheduling
- 12.4. Regional Scheduling
- 12.5. Advanced Topics
- 12.6. Summary and Perspective
- Chapter 13. Register Allocation
- 13.1. Introduction
- 13.2. Background Issues
- 13.3. Local Register Allocation and Assignment
- 13.4. Global Register Allocation and Assignment
- 13.5. Advanced Topics
- 13.6. Summary and Perspective
- Appendix A. ILOC
- Appendix B. Data Structures
- Bibliography
- Index
Show and hide more
Product information
- Title: Engineering a Compiler, 2nd Edition
- Author(s): Keith D. Cooper, Linda Torczon
- Release date: January 2011
- Publisher(s): Morgan Kaufmann
- ISBN: 9780080916613
You might also like
Check it out now on O’Reilly
Dive in for free with a 10-day trial of the O’Reilly learning platform—then explore all the other resources our members count on to build skills and solve problems every day.