|
|
11.10 Peephole Optimization
Peephole optimization is actually a family of optimizations that looks at a small number
of outlines of output code, looking for a pattern. It is so easy to do many of these that
it is not unreasonable to put out poor code initially. It simplifies the code generation
phase. Compiler designers look at the code produced when a compiler is up and running.
This is called profiling. As they find new patterns actually produced, they keep
adding optimization routines.
|