Quick Compilers Through Peephole Optimization

Report
Authors:Davidson, Jack, Department of Computer ScienceUniversity of Virginia Whalley, David, Department of Computer ScienceUniversity of Virginia
Abstract:

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

Rights:
All rights reserved (no additional license for public reuse)
Language:
English
Source Citation:

Davidson, Jack, and David Whalley. "Quick Compilers Through Peephole Optimization." University of Virginia Dept. of Computer Science Tech Report (1988).

Publisher:
University of Virginia, Department of Computer Science
Published Date:
1988