
Clément Vasseur.
Code generator generators.
CSI Seminar June 2004
The main part of a compiler backend is the instruction selection. Its goal is to generate the assembly code for the target CPU from an intermediate representation of the program.
There are several methods in order to perform an efficient instruction selection in an automatic way. So, it is possible to generate the code generator, in a similar way as parsers are generated. That is, the code generator is generated from a specification that gives the links between the trees of intermediate representation and the instructions that should be emitted.
In a first time, we will see how the selection instruction works, what algorithms are involved. Then we will explain how they can be automated and generated.
to top