Analyzing and addressing false interactions during compiler optimization phase ordering

Compiler optimization phase ordering is a fundamental, pervasive, and long‐standing problem for optimizing compilers. This problem is caused by interacting optimization phases producing different codes when applied in different orders. Producing the best phase ordering code is very important in performance‐oriented and cost‐constrained domains, such as embedded systems. In this work, we analyze the causes of the phase ordering problem in our compiler, Very Portable Optimizer (VPO), and report our observations. We devise new techniques to eliminate, what we call, false phase interactions in our compiler. We find that reducing such false phase interactions significantly prunes the phase order search space. We also develop and study algorithms to find the best average performance that can be delivered by a single phase sequence over our benchmark set and discuss the challenges in resolving this important problem. Our results show that there is no single sequence in VPO that can achieve the optimal phase ordering performance across all functions. Copyright © 2013 John Wiley & Sons, Ltd.

[1]  Keith D. Cooper,et al.  Improvements to graph coloring register allocation , 1994, TOPL.

[2]  Manuel E. Benitez,et al.  A portable global optimizer and linker , 1988, PLDI '88.

[3]  David B. Whalley,et al.  A design environment for addressing architecture and compiler interactions , 1992, Inf. Softw. Technol..

[4]  Steven R. Vegdahl Phase coupling and constant generation in an optimizing microcode compiler , 1982, MICRO 15.

[5]  Bruce R. Schatz,et al.  An Overview of the Production-Quality Compiler-Compiler Project , 1980, Computer.

[6]  Keith D. Cooper,et al.  ACME: adaptive compilation made efficient , 2005, LCTES '05.

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

[8]  Peter M. W. Knijnenburg,et al.  Automatic selection of compiler options using non-parametric inferential statistics , 2005, 14th International Conference on Parallel Architectures and Compilation Techniques (PACT'05).

[9]  David Whalley,et al.  A Design Environment for Addressing Architecutre and Compiler Interactions , 1993 .

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

[11]  Thomas R. Gross,et al.  Postpass Code Optimization of Pipeline Constraints , 1983, TOPL.

[12]  Yunheung Paek,et al.  Finding effective optimization phase sequences , 2003, LCTES '03.

[13]  James R. Goodman,et al.  Code scheduling and register allocation in large basic blocks , 2014, ICS 25th Anniversary.

[14]  Michael F. P. O'Boyle,et al.  Using machine learning to focus iterative optimization , 2006, International Symposium on Code Generation and Optimization (CGO'06).

[15]  David B. Whalley,et al.  Improving both the performance benefits and speed of optimization phase sequence searches , 2010, LCTES '10.

[16]  Peter M. W. Knijnenburg,et al.  Generating new general compiler optimization settings , 2005, ICS '05.

[17]  D CooperKeith,et al.  Optimizing for reduced code space using genetic algorithms , 1999 .

[18]  Lieven Eeckhout,et al.  Evaluating iterative optimization across 1000 datasets , 2010, PLDI '10.

[19]  Shlomit S. Pinter,et al.  Register allocation with instruction scheduling , 1993, PLDI '93.

[20]  Philip J. Fleming,et al.  How not to lie with statistics: the correct way to summarize benchmark results , 1986, CACM.

[21]  J. S. Hunter,et al.  Statistics for experimenters : an introduction to design, data analysis, and model building , 1979 .

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

[23]  Andreas Krall,et al.  Dependence-Conscious Global Register Allocation , 1994, Programming Languages and System Architectures.

[24]  José Nelson Amaral,et al.  Using machines to learn method-specific compilation strategies , 2011, International Symposium on Code Generation and Optimization (CGO 2011).

[25]  Andrew W. Appel,et al.  Iterated register coalescing , 1996, TOPL.

[26]  J. S. Hunter,et al.  Statistics for Experimenters: An Introduction to Design, Data Analysis, and Model Building. , 1979 .

[27]  Lieven Eeckhout,et al.  Cole: compiler optimization level exploration , 2008, CGO '08.

[28]  Rudolf Eigenmann,et al.  Fast and effective orchestration of compiler optimizations for automatic performance tuning , 2006, International Symposium on Code Generation and Optimization (CGO'06).

[29]  Gary S. Tyson,et al.  Practical exhaustive optimization phase order exploration and evaluation , 2009, TACO.

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

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

[32]  Albert Cohen,et al.  Quick and Practical Run-Time Evaluation of Multiple Program Optimizations , 2007, Trans. High Perform. Embed. Archit. Compil..

[33]  Steven S. Muchnick,et al.  Efficient instruction scheduling for a pipelined architecture (with retrospective) , 1986 .

[34]  Michael F. P. O'Boyle,et al.  MILEPOST GCC: machine learning based research compiler , 2008 .

[35]  Trevor Mudge,et al.  MiBench: A free, commercially representative embedded benchmark suite , 2001 .

[36]  Todd M. Austin,et al.  The SimpleScalar tool set, version 2.0 , 1997, CARN.

[37]  Michael F. P. O'Boyle,et al.  A Feasibility Study in Iterative Compilation , 1999, ISHPC.

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

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

[40]  Steven S. Muchnick,et al.  Efficient instruction scheduling for a pipelined architecture , 1986, SIGPLAN '86.

[41]  Michael F. P. O'Boyle,et al.  Method-specific dynamic compilation using logistic regression , 2006, OOPSLA '06.

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

[43]  Jack W. Davidson,et al.  A retargetable instruction reorganizer , 1986, SIGPLAN '86.

[44]  Peter M. W. Knijnenburg,et al.  On the impact of data input sets on statistical compiler tuning , 2006, Proceedings 20th IEEE International Parallel & Distributed Processing Symposium.

[45]  Peter M. W. Knijnenburg,et al.  Iterative compilation in a non-linear optimisation space , 1998 .

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

[47]  Prasad A. Kulkarni,et al.  Eliminating false phase interactions to reduce optimization phase order search space , 2010, CASES '10.

[48]  Peter M. W. Knijnenburg,et al.  Optimizing general purpose compiler optimization , 2005, CF '05.

[49]  Mark Stephenson,et al.  Predicting unroll factors using supervised classification , 2005, International Symposium on Code Generation and Optimization.

[50]  Keith D. Cooper,et al.  Combining analyses, combining optimizations , 1995, TOPL.

[51]  Michael F. P. O'Boyle,et al.  Proceedings of the 1998 Workshop on Profile and Feedback Directed Compilation (PFDC'98) , 1998 .