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
To translate a program from an intermediate representation ...