The 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.
- Focuses on the back end of the compiler—reflecting the focus of research and development over the last decade.
- Uses the well-developed theory from scanning and parsing to introduce concepts that play a critical role in optimization and code generation.
- Introduces the student to optimization through data-flow analysis, SSA form, and a selection of scalar optimizations.
- Builds on this background to teach modern methods in code generation: instruction selection, instruction scheduling, and register allocation.
- Presents examples in several different programming languages in order to best illustrate the concept.
- Provides end-of-chapter exercises.
Professionals and students involved in designing computers including computer architects, computer system engineers, and designers of compilers and operating systems.
Overview of Compilation; Scanning; Parsing; Context-Sensitive Analysis; Intermediate Representations; Procedure Abstraction; Code Shape; Introduction to Code Optimization; Data-Flow Analysis; Transformations; Instruction Selection; Instruction Scheduling; Register Allocation; Appendix A: ILOC; Appendix B: Data Structures; Appendix C: Abbreviations, Acronyms, and Glossary
- No. of pages:
- © Morgan Kaufmann 2003
- 11th December 2003
- Morgan Kaufmann
- eBook ISBN:
Dr. Cooper, 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.
Rice University, Houston, Texas
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.
Rice University, Houston, Texas
Keith Cooper and Linda Torczon are leading compilers researchers who have also built several state-of-the-art compilers. This book adeptly spans both worlds, by explaining both time-tested techniques and new algorithms, and by providing practical advice on engineering and constructing a compiler. Engineering a Compiler is a rich survey and exposition of the important techniques necessary to build a modern compiler. -Jim Larus, Microsoft Research A wonderful introduction to the theory, practice, and lore of modern compilers. Cooper and Torczon convey the simple joys of this subject that follow from the elegant interplay between compilation and the rest of computer science. If you're looking for an end-to-end tour of compiler construction annotated with a broad range of practical experiences, this is the book. -Michael D. Smith, Harvard University Modern compilers have played critical roles in areas such as software development tools, application performance, and processor design. This book has done an excellent job of illustrating various state-of-the-art technologies for an advanced compiler, in particular, optimization and code generation, the core of modern compilers. Compilers have evolved into complicated software and what makes a good compiler largely lies in the wisdom of engineering during design and development. The readers of this book can certainly learn how to construct a modern compiler with various engineering trade-offs. -Roy Ju, Senior Researcher,Microprocessor Research Labs, Intel Corp. As researchers, the authors have made major contributions to the literature and as teachers, they have produced leaders in the field. The combination is reflected in a book that is rich with the insight of great research and written with the clarity of experienced teachers. The result is an outstanding text. -Steve Blackburn, The Australian National University