A Framework for Exploring Optimization Properties

Important challenges for compiler optimization include determining what optimizations to apply, where to apply them and what is a good sequence in which to apply them. To address these challenges, an understanding of optimization properties is needed. We present a model-based framework, FOP, to determine how optimizations enable and disable one another. We combine the interaction and profitability properties to determine a "best" sequence for applying optimizations. FOP has three components: (1) a code model for the program, (2) optimization models that capture when optimizations are applicable and their actions, and (3) a resource model that expresses the hardware resources affected by optimizations. FOP determines interactions by comparing the create- and destroy-conditions of each optimization with the post conditions of other optimizations. We develop a technique with FOP to construct code-specific optimization sequences. Experimentally, we demonstrate that our approach achieves similarly good code quality as empirical techniques with less compile-time.

[1]  Sang Lyul Min,et al.  Languages, Compilers, and Tools for Embedded Systems , 2001, Lecture Notes in Computer Science.

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

[3]  Eric Van Wyk,et al.  Proving correctness of compiler optimizations by temporal logic , 2002, POPL '02.

[4]  H. Brown,et al.  Computational Problems in Abstract Algebra , 1971 .

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

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

[7]  Michael F. P. O'Boyle,et al.  Combined Selection of Tile Sizes and Unroll Factors Using Iterative Compilation , 2004, The Journal of Supercomputing.

[8]  Rajiv Gupta,et al.  Comparison checking: an approach to avoid debugging of optimized code , 1999, ESEC/FSE-7.

[9]  Gary S. Tyson,et al.  Evaluating Heuristic Optimization Phase Order Search Algorithms , 2007, International Symposium on Code Generation and Optimization (CGO'07).

[10]  D. J. Lacey,et al.  Program transformation using temporal logic specifications , 2003 .

[11]  Mary Lou Soffa,et al.  A model-based framework: an approach for profit-driven optimization , 2005, International Symposium on Code Generation and Optimization.

[12]  Oscar Nierstrasz,et al.  Software Engineering - ESEC/FSE '99 , 1999 .

[13]  Gary S. Tyson,et al.  Exhaustive optimization phase order space exploration , 2006, International Symposium on Code Generation and Optimization (CGO'06).

[14]  Sorin Lerner,et al.  Automatically proving the correctness of compiler optimizations , 2003, PLDI '03.

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

[16]  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).

[17]  Kathryn S. McKinley,et al.  Tile size selection using cache organization and data layout , 1995, PLDI '95.

[18]  Gilles Dowek,et al.  Principles of programming languages , 1981, Prentice Hall International Series in Computer Science.

[19]  Marvin V. Zelkowitz,et al.  Programming Languages: Design and Implementation , 1975 .

[20]  Gang Ren,et al.  A comparison of empirical and model-driven optimization , 2003, PLDI '03.

[21]  Mary Lou Soffa,et al.  An approach to ordering optimizing transformations , 1990, PPOPP '90.

[22]  Joe D. Warren,et al.  The program dependence graph and its use in optimization , 1987, TOPL.

[23]  George C. Necula,et al.  Translation validation for an optimizing compiler , 2000, PLDI '00.

[24]  D. Knuth,et al.  Simple Word Problems in Universal Algebras , 1983 .

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

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

[27]  Rajiv Gupta,et al.  Complete removal of redundant expressions , 1998, PLDI 1998.