ACME: adaptive compilation made efficient

Research over the past five years has shown significant performance improvements using a technique called adaptive compilation. An adaptive compiler uses a compile-execute-analyze feedback loop to find the combination of optimizations and parameters that minimizes some performance goal, such as code size or execution time.Despite its ability to improve performance, adaptive compilation has not seen widespread use because of two obstacles: the large amounts of time that such systems have used to perform the many compilations and executions prohibits most users from adopting these systems, and the complexity inherent in a feedback-driven adaptive system has made it difficult to build and hard to use.A significant portion of the adaptive compilation process is devoted to multiple executions of the code being compiled. We have developed a technique called virtual execution to address this problem. Virtual execution runs the program a single time and preserves information that allows us to accurately predict the performance of different optimization sequences without running the code again. Our prototype implementation of this technique significantly reduces the time required by our adaptive compiler.In conjunction with this performance boost, we have developed a graphical-user interface (GUI) that provides a controlled view of the compilation process. By providing appropriate defaults, the interface limits the amount of information that the user must provide to get started. At the same time, it lets the experienced user exert fine-grained control over the parameters that control the system.

[1]  Michael F. P. O'Boyle,et al.  Combined Selection of Tile Sizes and Unroll Factors Using Iterative Compilation , 2000, Proceedings 2000 International Conference on Parallel Architectures and Compilation Techniques (Cat. No.PR00622).

[2]  Preston Briggs,et al.  Register allocation via graph coloring , 1992 .

[3]  Mary Lou Soffa,et al.  An approach for exploring code improving transformations , 1997, TOPL.

[4]  Keith D. Cooper,et al.  Effective partial redundancy elimination , 1994, PLDI '94.

[5]  Saman P. Amarasinghe,et al.  Meta optimization: improving compiler heuristics with machine learning , 2003, PLDI '03.

[6]  Mark N. Wegman,et al.  Efficiently computing static single assignment form and the control dependence graph , 1991, TOPL.

[7]  Mary Lou Soffa,et al.  Predicting the impact of optimizations for embedded systems , 2003 .

[8]  L. Almagor,et al.  Finding effective compilation sequences , 2004, LCTES '04.

[9]  Keith D. Cooper,et al.  Value-driven redundancy elimination , 1996 .

[10]  Yunheung Paek,et al.  Finding effective optimization phase sequences , 2003 .

[11]  E. Granston,et al.  Automatic Recommendation of Compiler Options , 2001 .

[12]  David I. August,et al.  Compiler optimization-space exploration , 2003, International Symposium on Code Generation and Optimization, 2003. CGO 2003..

[13]  Douglas L. Jones,et al.  Fast searches for effective optimization phase sequences , 2004, PLDI '04.

[14]  Bowen Alpern,et al.  Detecting equality of variables in programs , 1988, POPL '88.

[15]  Bernhard Steffen,et al.  Lazy code motion , 1992, PLDI '92.

[16]  Keith D. Cooper,et al.  Optimizing for reduced code space using genetic algorithms , 1999, LCTES '99.

[17]  Keith D. Cooper,et al.  Searching for Compilation Sequences , 2004 .

[18]  Mark N. Wegman,et al.  Constant propagation with conditional branches , 1985, POPL.

[19]  John Cocke,et al.  Register allocation via graph coloring , 1981 .

[20]  Keith D. Cooper,et al.  Adaptive Optimizing Compilers for the 21st Century , 2002, The Journal of Supercomputing.

[21]  Chau-Wen Tseng,et al.  Improving data locality with loop transformations , 1996, TOPL.

[22]  Keith D. Cooper,et al.  Adaptive ordering of code transformations in an optimizing compiler , 2005 .

[23]  Etienne Morel,et al.  Global optimization by suppression of partial redundancies , 1979, CACM.

[24]  James R. Larus,et al.  Optimally profiling and tracing programs , 1994, TOPL.

[25]  Jin-Kao Hao,et al.  A Hybrid Genetic Algorithm for the Satisfiability Problem , 2002 .

[26]  Christopher W. Fraser,et al.  The Design and Application of a Retargetable Peephole Optimizer , 1980, TOPL.

[27]  Keith D. Cooper,et al.  Engineering a Compiler , 2003 .