Using Peephole Optimization on Intermediate Code
Andrew S. Tanenbaum, Hans van Staveren, Johan W. Stevenson · ACM Transactions on Programming Languages and Systems · 1982
Many portable compilers generate an intermediate code that is subsequently translated into the target machine's assembly language.In this paper a stack-machine-based intermediate code suitable for algebraic languages (e.g., PASCAL, C, FORTRAN) and most byte-addressed mini-and microcomputers is described.A table-driven peephole optimizer that improves this intermediate code is then discussed in detail and compared with other local optimization methods.Measurements show an improvement of about 15 percent, depending on the precise metric used.
Cited by 88 works. doi:10.1145/357153.357155 Open-access PDF
Authors
References
- The UNIX time-sharing system
- The UNIX time-sharing system
- An empirical study of FORTRAN programs
- A portable compiler
- The design of an optimizing compiler
- Static and Dynamic Characteristics of XPL Programs
- The Design of an Optimizing Compiler
- Implications of structured programming for machine architecture
- An Overview of the Production-Quality Compiler-Compiler Project
- Peephole optimization