Engineering a Compiler

Engineering a Compiler

3rd Edition - August 20, 2022

Write a review

  • Authors: Keith Cooper, Linda Torczon
  • Paperback ISBN: 9780128154120
  • eBook ISBN: 9780128189269

Purchase options

Purchase options
Available for Pre-Order
DRM-free (PDF, EPub)
Sales tax will be calculated at check-out

Institutional Subscription

Free Global Shipping
No minimum order

Description

Engineering a Compiler, Third Edition covers the latest developments in compiler technology, with new chapters focusing on semantic elaboration (the problems that arise in generating code from the ad-hoc syntax-directed translation schemes in a generated parser), on runtime support for naming and addressability, and on code shape for expressions, assignments and control-structures. Leading educators and researchers, Keith Cooper and Linda Torczon, have revised this popular text with a fresh approach to learning important techniques for constructing a modern compiler, combining basic principles with pragmatic insights from their own experience building state-of-the-art compilers.

Key Features

  • Presents in-depth treatments of algorithms and techniques used in the front end of a modern compiler
  • Pays particular attention to code optimization and code generation, both primary areas of recent research and development
  • Focuses on how compilers (and interpreters) implement abstraction, tying the underlying knowledge to students’ own experience and to the languages in which they have been taught to program
  • Covers bottom-up methods of register allocation at the local scope

Readership

Graduate, some undergraduate students in computer science. Professional compiler writers, system software developers, architects and computer system designers

Table of Contents

  • Cover image
  • Title page
  • Table of Contents
  • Copyright
  • Dedication
  • About the Authors
  • About the Cover
  • Preface
  • Changes in the Third Edition
  • Organization
  • Approach
  • Philosophy
  • A Word About Programming Exercises
  • Additional Materials
  • Acknowledgments
  • Chapter 1: Overview of Compilation
  • 1.1. Introduction
  • 1.2. Compiler Structure
  • 1.3. Overview of Translation
  • 1.4. Engineering
  • 1.5. Summary and Perspective
  • Chapter Notes
  • Exercises
  • Bibliography
  • 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. Summary and Perspective
  • Chapter Notes
  • Exercises
  • Bibliography
  • 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 Notes
  • Exercises
  • Bibliography
  • Chapter 4: Intermediate Representations
  • 4.1. Introduction
  • 4.2. An IR Taxonomy
  • 4.3. Graphical IRs
  • 4.4. Linear IRs
  • 4.5. Symbol Tables
  • 4.6. Name Spaces
  • 4.7. Placement of Values in Memory
  • 4.8. Summary and Perspective
  • Chapter Notes
  • Exercises
  • Bibliography
  • Chapter 5: Syntax-Driven Translation
  • 5.1. Introduction
  • 5.2. Background
  • 5.3. Syntax-Driven Translation
  • 5.4. Modeling the Naming Environment
  • 5.5. Type Information
  • 5.6. Storage Layout
  • 5.7. Advanced Topics
  • 5.8. Summary and Perspective
  • Chapter Notes
  • Exercises
  • Bibliography
  • Chapter 6: Implementing Procedures
  • 6.1. Introduction
  • 6.2. Background
  • 6.3. Runtime Support for Naming
  • 6.4. Passing Values Between Procedures
  • 6.5. Standardized Linkages
  • 6.6. Advanced Topics
  • 6.7. Summary and Perspective
  • Chapter Notes
  • Exercises
  • Bibliography
  • Chapter 7: Code Shape
  • 7.1. Introduction
  • 7.2. Arithmetic Operators
  • 7.3. Access Methods for Values
  • 7.4. Boolean and Relational Operators
  • 7.5. Control-Flow Constructs
  • 7.6. Operations on Strings
  • 7.7. Procedure Calls
  • 7.8. Summary and Perspective
  • Chapter Notes
  • Exercises
  • Bibliography
  • 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 Notes
  • Exercises
  • Bibliography
  • 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 Notes
  • Exercises
  • Bibliography
  • Chapter 10: Scalar Optimization
  • 10.1. Introduction
  • 10.2. Dead Code Elimination
  • 10.3. Code Motion
  • 10.4. Specialization
  • 10.5. Redundancy Elimination
  • 10.6. Enabling Other Transformations
  • 10.7. Advanced Topics
  • 10.8. Summary and Perspective
  • Chapter Notes
  • Exercises
  • Bibliography
  • Chapter 11: Instruction Selection
  • 11.1. Introduction
  • 11.2. Background
  • 11.3. Selection via Peephole Optimization
  • 11.4. Selection via Tree-Pattern Matching
  • 11.5. Advanced Topics
  • 11.6. Summary and Perspective
  • Chapter Notes
  • Exercises
  • Bibliography
  • Chapter 12: Instruction Scheduling
  • 12.1. Introduction
  • 12.2. Background
  • 12.3. Local Scheduling
  • 12.4. Regional Scheduling
  • 12.5. Advanced Topics
  • 12.6. Summary and Perspective
  • Chapter Notes
  • Exercises
  • Bibliography
  • Chapter 13: Register Allocation
  • 13.1. Introduction
  • 13.2. Background
  • 13.3. Local Register Allocation
  • 13.4. Global Allocation via Coloring
  • 13.5. Advanced Topics
  • 13.6. Summary and Perspective
  • Chapter Notes
  • Exercises
  • Bibliography
  • Chapter 14: Runtime Optimization
  • 14.1. Introduction
  • 14.2. Background
  • 14.3. Hot-Trace Optimization
  • 14.4. Hot-Method Optimization
  • 14.5. Advanced Topics
  • 14.6. Summary and Perspective
  • Chapter Notes
  • Exercises
  • Bibliography
  • Appendix A: ILOC
  • A.1. Introduction
  • A.2. Naming Conventions
  • A.3. Computational Operations
  • A.4. Data Movement Operations
  • A.5. Control-Flow Operations
  • A.6. Opcode Summary Tables
  • Appendix B: Data Structures
  • B.1. Introduction
  • B.2. Representing Sets
  • B.3. IR Implementation
  • B.4. Implementing Hash Tables
  • B.5. A Flexible Symbol-Table Design
  • Appendix Notes
  • Bibliography
  • Bibliography
  • Bibliography
  • Index

Product details

  • No. of pages: 848
  • Language: English
  • Copyright: © Morgan Kaufmann 2022
  • Published: August 20, 2022
  • Imprint: Morgan Kaufmann
  • Paperback ISBN: 9780128154120
  • eBook ISBN: 9780128189269

About the Authors

Keith Cooper

Dr. Cooper Ph.D., Professor, Dept. of Computer Science at Rice University, is the leader of the Massively Scalar Compiler Project at Rice, which investigates issues relating to optimization and code generation for modern machines. He is also a member of the Center for High Performance Software Research, the Computer and Information Technology Institute, and the Center for Multimedia Communication -- all at Rice. He teaches courses in Compiler Construction at the undergraduate and graduate level.

Affiliations and Expertise

Department of Computer Science, Rice University, Houston, Texas, USA

Linda Torczon

Linda Torczon is a principal investigator on the Massively Scalar Compiler Project at Rice University, and the Grid Application Development Software Project sponsored by the next Generation Software program of the National Science Foundation. She also serves as the executive director of HiPerSoft and of the Los Alamos Computer Science Institute. Her research interests include code generation, interprocedural dataflow analysis and optimization, and programming environments.

Affiliations and Expertise

Principal Investigator on the Massively Scalar Compiler Project, Rice University, Houston, Texas, USA

Ratings and Reviews

Write a review

There are currently no reviews for "Engineering a Compiler"