Location via proxy:   [ UP ]  
[Report a bug]   [Manage cookies]                
skip to main content
10.1145/1134650.1134663acmconferencesArticle/Chapter ViewAbstractPublication PagescpsweekConference Proceedingsconference-collections
Article

In search of near-optimal optimization phase orderings

Published: 14 June 2006 Publication History

Abstract

Phase ordering is a long standing challenge for traditional optimizing compilers. Varying the order of applying optimization phases to a program can produce different code, with potentially significant performance variation amongst them. A key insight to addressing the phase ordering problem is that many different optimization sequences produce the same code. In an earlier study, we used this observation to restate the phase ordering problem to concentrate on finding all distinct function instances that can be produced due to different phase orderings, instead of attempting to generate code for all possible optimization sequences. Using a novel search algorithm we were able to show that it is possible to exhaustively enumerate the set of all possible function instances that can be produced by different phase orderings in our compiler for most of the functions in our benchmark suite [1]. Finding the optimal function instance within this set for almost any dynamic measure of performance still appears impractical since that would involve execution/simulation of all generated function instances. To find the dynamically optimal function instance we exploit the observation that the enumeration space for a function typically contains a very small number of distinct control flow paths. We simulate only one function instance from each group of function instances having the identical control flow, and use that information to estimate the dynamic performance of the remaining functions in that group. We further show that the estimated dynamic frequency counts obtained by using our method correlate extremely well to simulated processor cycle counts. Thus, by using our measure of dynamic frequencies to identify a small number of the best performing function instances we can often find the optimal phase ordering for a function within a reasonable amount of time. Finally, we perform a case study to evaluate how adept our genetic algorithm is for finding optimal phase orderings within our compiler, and demonstrate how the algorithm can be improved.

References

[1]
P. Kulkarni, D. Whalley, G. Tyson, and J. Davidson. Exhaustive optimization phase order space exploration. In Proceedings of the Fourth Annual IEEE/ACM International Symposium on Code Generation and Optimization, March 26--29 2006.
[2]
Steven R. Vegdahl. Phase coupling and constant generation in an optimizing microcode compiler. In Proceedings of the 15th annual workshop on Microprogramming, pages 125--133. IEEE Press, 1982.
[3]
D. Whitfield and M. L. Soffa. An approach to ordering optimizing transformations. In Proceedings of the second ACM SIGPLAN symposium on Principles & Practice of Parallel Programming, pages 137--146. ACM Press, 1990.
[4]
Keith D. Cooper, Philip J. Schielke, and Devika Subramanian. Optimizing for reduced code space using genetic algorithms. In Workshop on Languages, Compilers, and Tools for Embedded Systems, pages 1--9, May 1999.
[5]
Prasad Kulkarni, Wankang Zhao, Hwashin Moon, Kyunghwan Cho, David Whalley, Jack Davidson, Mark Bailey, Yunheung Paek, and Kyle Gallivan. Finding effective optimization phase sequences. In Proceedings of the 2003 ACM SIGPLAN conference on Language, Compiler, and Tool for Embedded Systems, pages 12--23. ACM Press, 2003.
[6]
T. Kisuki, P. Knijnenburg, and M.F.P. O'Boyle. Combined selection of tile sizes and unroll factors using iterative compilation. In Proc. PACT, pages 237--246, 2000.
[7]
Spyridon Triantafyllis, Manish Vachharajani, Neil Vachharajani, and David I. August. Compiler optimization-space exploration. In Proceedings of the international symposium on Code Generation and Optimization, pages 204--215. IEEE Computer Society, 2003.
[8]
P. Kulkarni, S. Hines, J. Hiser, D. Whalley, J. Davidson, and D. Jones. Fast searches for effective optimization phase sequences. In Proceedings of the ACM SIGPLAN '04 Conference on Programming Language Design and Implementation, June 2004.
[9]
Deborah L. Whitfield and Mary Lou Soffa. An approach for exploring code improving transformations. ACM Trans. Program. Lang. Syst., 19(6):1053--1084, 1997.
[10]
Min Zhao, Bruce R. Childers, and Mary Lou Soffa. A model-based framework: An approach for profit-driven optimization. In Proceedings of the international symposium on Code generation and optimization, pages 317--327, Washington, DC, USA, 2005.
[11]
L. Almagor, Keith D. Cooper, Alexander Grosul, Timothy J. Harvey, Steven W. Reeves, Devika Subramanian, Linda Torczon, and Todd Waterman. Finding effective compilation sequences. In LCTES '04: Proceedings of the 2004 ACM SIGPLAN/SIGBED conference on Languages, Compilers, and Tools for Embedded Systems, pages 231--239, New York, NY, USA, 2004. ACM Press.
[12]
F. Bodin, T. Kisuki, P.M.W. Knijnenburg, M.F.P. O'Boyle, and E. Rohou. Iterative compilation in a non-linear optimisation space. Proc. Workshop on Profile and Feedback Directed Compilation. Organized in conjuction with PACT'98, 1998.
[13]
Prasad A. Kulkarni, Stephen R. Hines, David B. Whalley, Jason D. Hiser, Jack W. Davidson, and Douglas L. Jones. Fast and efficient searches for effective optimization-phase sequences. ACM Trans. Archit. Code Optim., 2(2):165--198, 2005.
[14]
T. Kisuki, P.M.W. Knijnenburg, M.F.P. O'Boyle, F. Bodin, and H.A.G. Wijshoff. A feasibility study in iterative compilation. In Proc. ISHPC'99, volume 1615 of Lecture Notes in Computer Science, pages 121--132, 1999.
[15]
Elana D. Granston and Anne Holler. Automatic recommendation of compiler options. 4th Workshop of Feedback-Directed and Dynamic Optimization, December 2001.
[16]
K. Chow and Y. Wu. Feedback-directed selection and characterization of compiler optimizatons. Proc. 2nd Workshop on Feedback Directed Optimization, 1999.
[17]
M. Haneda, P. M. W. Knijnenburg, and H. A. G. Wijshoff. Generating new general compiler optimization settings. In ICS '05: Proceedings of the 19th annual international conference on Supercomputing, pages 161--168, New York, NY, USA, 2005. ACM Press.
[18]
P.M.W. Knijnenburg, T. Kisuki, K. Gallivan, and M.F.P. O'Boyle. The effect of cache models on iterative compilation for combined tiling and unrolling. In Proc. FDDO-3, pages 31--40, 2000.
[19]
Tim A. Wagner, Vance Maverick, Susan L. Graham, and Michael A. Harrison. Accurate static estimators for program optimization. SIGPLAN Not., 29(6):85--96, 1994.
[20]
K. Cooper, A. Grosul, T. Harvey, S. Reeves, D. Subramanian, L. Torczon, and T. Waterman. Acme: Adaptive compilation made efficient. In Proceedings of the ACM SIGPLAN/SIGBED Conference on Languages, Compilers, and Tools for Embedded Systems, pages 69--78, June 15--17 2005.
[21]
M. E. Benitez and J. W. Davidson. A portable global optimizer and linker. In Proceedings of the SIGPLAN'88 conference on Programming Language Design and Implementation, pages 329--338. ACM Press, 1988.
[22]
Doug Burger and Todd M. Austin. The SimpleScalar tool set, version 2.0. SIGARCH Comput. Archit. News, 25(3):13--25, 1997.
[23]
Matthew R. Guthaus, Jeffrey S. Ringenberg, Dan Ernst, Todd M. Austin, Trevor Mudge, and Richard B. Brown. MiBench: A free, commercially representative embedded benchmark suite. IEEE 4th Annual Workshop on Workload Characterization, December 2001.
[24]
W. Peterson and D. Brown. Cyclic codes for error detection. In Proceedings of the IRE, volume 49, pages 228--235, January 1961.
[25]
Jack W. Davidson and David B. Whalley. A design environment for addressing architecture and compiler interactions. Microprocessors and Microsystems, 15(9):459--472, November 1991.

Cited By

View all
  • (2017)Piecewise holistic autotuning of parallel programs with CEREConcurrency and Computation: Practice and Experience10.1002/cpe.419029:15Online publication date: 20-Jun-2017
  • (2014)Introduction and MotivationScalable and Near-Optimal Design Space Exploration for Embedded Systems10.1007/978-3-319-04942-7_1(1-11)Online publication date: 21-Feb-2014
  • (2010)Improving both the performance benefits and speed of optimization phase sequence searchesACM SIGPLAN Notices10.1145/1755951.175590345:4(95-104)Online publication date: 13-Apr-2010
  • Show More Cited By

Recommendations

Comments

Information & Contributors

Information

Published In

cover image ACM Conferences
LCTES '06: Proceedings of the 2006 ACM SIGPLAN/SIGBED conference on Language, compilers, and tool support for embedded systems
June 2006
220 pages
ISBN:159593362X
DOI:10.1145/1134650
  • cover image ACM SIGPLAN Notices
    ACM SIGPLAN Notices  Volume 41, Issue 7
    Proceedings of the 2006 LCTES Conference
    July 2006
    208 pages
    ISSN:0362-1340
    EISSN:1558-1160
    DOI:10.1145/1159974
    Issue’s Table of Contents
Permission to make digital or hard copies of all or part of this work for personal or classroom use is granted without fee provided that copies are not made or distributed for profit or commercial advantage and that copies bear this notice and the full citation on the first page. Copyrights for components of this work owned by others than ACM must be honored. Abstracting with credit is permitted. To copy otherwise, or republish, to post on servers or to redistribute to lists, requires prior specific permission and/or a fee. Request permissions from [email protected]

Sponsors

Publisher

Association for Computing Machinery

New York, NY, United States

Publication History

Published: 14 June 2006

Permissions

Request permissions for this article.

Check for updates

Author Tags

  1. exhaustive search
  2. genetic algorithms
  3. phase ordering

Qualifiers

  • Article

Conference

LCTES06

Acceptance Rates

Overall Acceptance Rate 116 of 438 submissions, 26%

Contributors

Other Metrics

Bibliometrics & Citations

Bibliometrics

Article Metrics

  • Downloads (Last 12 months)5
  • Downloads (Last 6 weeks)0
Reflects downloads up to 03 Oct 2024

Other Metrics

Citations

Cited By

View all
  • (2017)Piecewise holistic autotuning of parallel programs with CEREConcurrency and Computation: Practice and Experience10.1002/cpe.419029:15Online publication date: 20-Jun-2017
  • (2014)Introduction and MotivationScalable and Near-Optimal Design Space Exploration for Embedded Systems10.1007/978-3-319-04942-7_1(1-11)Online publication date: 21-Feb-2014
  • (2010)Improving both the performance benefits and speed of optimization phase sequence searchesACM SIGPLAN Notices10.1145/1755951.175590345:4(95-104)Online publication date: 13-Apr-2010
  • (2010)Improving both the performance benefits and speed of optimization phase sequence searchesProceedings of the ACM SIGPLAN/SIGBED 2010 conference on Languages, compilers, and tools for embedded systems10.1145/1755888.1755903(95-104)Online publication date: 13-Apr-2010
  • (2009)Practical exhaustive optimization phase order exploration and evaluationACM Transactions on Architecture and Code Optimization10.1145/1509864.15098656:1(1-36)Online publication date: 2-Apr-2009
  • (2007)Evaluating Heuristic Optimization Phase Order Search AlgorithmsProceedings of the International Symposium on Code Generation and Optimization10.1109/CGO.2007.9(157-169)Online publication date: 11-Mar-2007
  • (2006)Code transformation strategies for extensible embedded processorsProceedings of the 2006 international conference on Compilers, architecture and synthesis for embedded systems10.1145/1176760.1176791(242-252)Online publication date: 22-Oct-2006
  • (2009)Statistical and Machine Learning Techniques in Compiler DesignThe Compiler Design Handbook10.1201/9781420043839.ch8(8-1-8-32)Online publication date: 7-Dec-2009
  • (2009)DFT performance prediction in FFTWProceedings of the 22nd international conference on Languages and Compilers for Parallel Computing10.1007/978-3-642-13374-9_10(140-156)Online publication date: 8-Oct-2009

View Options

Get Access

Login options

View options

PDF

View or Download as a PDF file.

PDF

eReader

View online with eReader.

eReader

Media

Figures

Other

Tables

Share

Share

Share this Publication link

Share on social media