Quick Compilers Through Peephole OptimizationReport
A compiler can be quickly realized by translating the abstract machine operations to target machine operations. The problem with these compilers is that they trade execution efficiency for portability. Typically the code emitted by these compilers runs two to three times slower than the code generated by compilers that employ sophisticated code generators. This paper describes a C compiler that uses abstract machine modeling to achieve portability. The emitted target machine code is improved by a simple, classical rule-directed peephole optimizer. Our experiments with this compiler on four machines show that a small number of very general hand-written patterns (under 40) yields code that is comparable to the code from compilers that use more sophisticated code generators. As an added bonus. compilation time on some machines is reduced by 10 to 20 percent.
Note: Abstract extracted from PDF file via OCR
All rights reserved (no additional license for public reuse)
Davidson, Jack, and David Whalley. "Quick Compilers Through Peephole Optimization." University of Virginia Dept. of Computer Science Tech Report (1988).
University of Virginia, Department of Computer Science