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 ...
Get Engineering a Compiler, 2nd Edition now with the O’Reilly learning platform.
O’Reilly members experience books, live events, courses curated by job role, and more from O’Reilly and nearly 200 top publishers.