ACM SIGPLAN Notices · 2009 · 57 citations · 28 references
ComputingComputer ScienceCompilersOptimizationProgramming LanguagesCompiler ConstructionControl-flow AnalysisData-flow AnalysisIntermediate RepresentationCompile-time OptimizationCompiler DesignCompiler Optimization ValidationHigh-level Intermediate RepresentationInterprocedural OptimizationOptimization HeuristicsOptimizer DesignProgram Optimization
Optimizations in a traditional compiler are applied sequentially, with each optimization destructively modifying the program to produce a transformed program that is then passed to the next optimization. We present a new approach for structuring the optimization phase of a compiler. In our approach, optimizations take the form of equality analyses that add equality information to a common intermediate representation. The optimizer works by repeatedly applying these analyses to infer equivalences between program fragments, thus saturating the intermediate representation with equalities. Once saturated, the intermediate representation encodes multiple optimized versions of the input program. At this point, a profitability heuristic picks the final optimized program from the various programs represented in the saturated representation. Our proposed way of structuring optimizers has a variety of benefits over previous approaches: our approach obviates the need to worry about optimization ordering, enables the use of a global optimization heuristic that selects among fully optimized programs, and can be used to perform translation validation, even on compilers other than our own. We present our approach, formalize it, and describe our choice of intermediate representation. We also present experimental results showing that our approach is practical in terms of time and space overhead, is effective at discovering intricate optimization opportunities, and is effective at performing translation validation for a realistic optimizer.
28
Simplify: a theorem prover for program checking
David Detlefs, Greg Nelson, James B. Saxe · Journal of the ACM · 2005 · 781 citations
Fast Decision Procedures Based on Congruence Closure
Greg Nelson, Derek C. Oppen · Journal of the ACM · 1980 · 509 citations · Full text
Translation validation for an optimizing compiler
George C. Necula · 2000 · 487 citations