O'Reilly logo

Engineering a Compiler by Linda Torczon, Keith Cooper

Stay ahead with the world's most comprehensive technology and business learning platform.

With Safari, you learn the way you learn best. Get unlimited access to videos, live online training, learning paths, books, tutorials, and more.

Start Free Trial

No credit card required

Chapter 11. Instruction Selection
The compiler's front end and optimizer both operate on the code in its ir form. Before the code can execute on a target processor, the ir form of the code must be rewritten into the processor's instruction set. The process of mapping ir operations into target machine operations is called instruction selection.
This chapter introduces two different approaches to instruction selection. The first uses the technology of tree-pattern matching algorithms. The second builds on the classic late-stage transformation, peephole optimization. Both have found widespread use in real compilers.
Instruction Selection, Tree-Pattern Matching, Peephole Optimization

11.1. Introduction

To translate a program from an intermediate representation ...

With Safari, you learn the way you learn best. Get unlimited access to videos, live online training, learning paths, books, interactive tutorials, and more.

Start Free Trial

No credit card required