Location via proxy:   [ UP ]  
[Report a bug]   [Manage cookies]                
skip to main content
article

Fast searches for effective optimization phase sequences

Published: 09 June 2004 Publication History

Abstract

It has long been known that a fixed ordering of optimization phases will not produce the best code for every application. One approach for addressing this phase ordering problem is to use an evolutionary algorithm to search for a specific sequence of phases for each module or function. While such searches have been shown to produce more efficient code, the approach can be extremely slow because the application is compiled and executed to evaluate each sequence's effectiveness. Consequently, evolutionary or iterative compilation schemes have been promoted for compilation systems targeting embedded applications where longer compilation times may be tolerated in the final stage of development. In this paper we describe two complementary general approaches for achieving faster searches for effective optimization sequences when using a genetic algorithm. The first approach reduces the search time by avoiding unnecessary executions of the application when possible. Results indicate search time reductions of 65% on average, often reducing searches from hours to minutes. The second approach modifies the search so fewer generations are required to achieve the same results. Measurements show that the average number of required generations decreased by 68%. These improvements have the potential for making evolutionary compilation a viable choice for tuning embedded applications.

References

[1]
M. E. Benitez and J. W. Davidson, "A Portable Global Optimizer and Linker," Proceedings of the SIGPLAN '88 Symposium on Programming Language Design and Implementation, pp. 329--338 (June 1988).
[2]
M. E. Benitez and J. W. Davidson, "The Advantages of Machine-Dependent Global Optimization," Proceedings of the Conference on Programming Languages and Systems Architectures, pp. 105--124 (March 1994).
[3]
B. Calder, D. Grunwald, and D. Lindsay, "Corpus-based Static Branch Prediction," Proceedings of the SIGPLAN '95 Conference on Programming Language Design and Implementation, pp. 79--92 (June 1995).
[4]
K. Chow and Y. Wu, "Feedback-Directed Selection and Characterization of Compiler Optimizations," Workshop on Feedback-Directed Optimization, (November 1999).
[5]
K. Cooper, P. Schielke, and D. Subramanian, "Optimizing for Reduced Code Space Using Genetic Algorithms," ACM SIGPLAN Workshop on Languages, Compilers, and Tools for Embedded Systems, pp. 1--9 (May 1999).
[6]
K. Cooper, D. Subramanian, and L. Torczon, "Adaptive Optimizing Compilers for the 21st Century," Journal of Supercomputing 23(1) pp. 7--22 ().
[7]
T. Granlund and R. Kenner, "Eliminating Branches using a Superoptimizer and the GNU C Compiler," Proceedings of the SIGPLAN '92 Conference on Programming Language Design and Implementation, pp. 341--352 (June 1992).
[8]
M. Guthaus, J. Ringenberg, D. Ernst, T. Austin, T. Mudge, and R. Brown, "MiBench: A Free, Commercially Representative Embedded Benchmark Suite," IEEE Workshop on Workload Characterization, (December 2001).
[9]
J. Holland, Adaptation in Natural and Artificial Systems, Addison-Wesley (1989).
[10]
T. Kisuki, P. Knijnenburg, and M. O'Boyle, "Combined Selection of Tile Sizes and Unroll Factors Using Iterative Compilation," Proceedings of the 2000 International Conference on Parallel Architectures and Compilation Techniques, pp. 237--248 (October 2000).
[11]
P. Kulkarni, W. Zhao, H. Moon, K. Cho, D. Whalley, J. Davidson, M. Bailey, Y. Paek, and K. Gallivan, "Finding Effective Optimization Phase Sequences," ACM SIGPLAN Conference on Languages, Compilers, and Tools for Embedded Systems, pp. 12--23 (June 2003).
[12]
H. Massalin, "Superoptimizer - A Look at the Smallest Program," Proceedings of the 2nd International Conference on Architectural Support for Programming Languages and Operating Systems, pp. 122--126 (October, 1987).
[13]
A. Nisbet, "Genetic Algorithm Optimized Parallelization," Workshop on Profile and Feedback Directed Compilation, (1998).
[14]
W. Peterson and D. Brown, "Cyclic Codes for Error Detection," Proceedings of the IRE 49 pp. 228--235 (January 1961).
[15]
M. Stephenson, S. Amarasinghe, M. Martin, and U. O'Reilly, "Meta Optimization: Improving Compiler Heuristics with Machine Learning," ACM SIGPLAN Conference on Programming Language Design and Implementation, pp. 77--90 (June 2003).
[16]
S. Triantafyllis, M. Vachharajani, N. Vachharajani, and D. August, "Compiler Optimization Space-Exploration," ACM SIGMICRO International Symposium on Code Generation and Optimization, (March 2003).
[17]
S. Vegdahl, "Phase Coupling and Constant Generation in an Optimizing Microcode Compiler," International Symposium on Microarchitecture, pp. 125--133 (1982).
[18]
R. Whaley, A. Petitet, and J. Dongarra, "Automated Empirical Optimization of Software and the ATLAS Project," Parallel Computing 27(1) pp. 3--35 (2001).
[19]
D. Whitfield and M. L. Soffa, "An Approach for Exploring Code-Improving Transformations," ACM Transactions on Programming Languages and Systems 19(6) pp. 1053--1084 (November 1997).
[20]
W. Zhao, B. Cai, D. Whalley, M. Bailey, R. van Engelen, X. Yuan, J. Hiser, J. Davidson, K. Gallivan, and D. Jones, "VISTA: A System for Interactive Code Improvement," ACM SIGPLAN Conference on Languages, Compilers, and Tools for Embedded Systems, pp. 155--164 (June 2002).

Cited By

View all
  • (2024)Exponentially Expanding the Phase-Ordering Search Space via Dormant InformationProceedings of the 33rd ACM SIGPLAN International Conference on Compiler Construction10.1145/3640537.3641582(250-261)Online publication date: 17-Feb-2024
  • (2024)Enabling Fine-Grained Incremental Builds by Making Compiler StatefulProceedings of the 2024 IEEE/ACM International Symposium on Code Generation and Optimization10.1109/CGO57630.2024.10444865(221-232)Online publication date: 2-Mar-2024
  • (2024)A Two-Stage LLVM Option Sequence Optimization Method to Minimize Energy ConsumptionSwarm and Evolutionary Computation10.1016/j.swevo.2024.10159188(101591)Online publication date: Jul-2024
  • Show More Cited By

Recommendations

Comments

Information & Contributors

Information

Published In

cover image ACM SIGPLAN Notices
ACM SIGPLAN Notices  Volume 39, Issue 6
PLDI '04
May 2004
299 pages
ISSN:0362-1340
EISSN:1558-1160
DOI:10.1145/996893
Issue’s Table of Contents
  • cover image ACM Conferences
    PLDI '04: Proceedings of the ACM SIGPLAN 2004 conference on Programming language design and implementation
    June 2004
    310 pages
    ISBN:1581138075
    DOI:10.1145/996841
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]

Publisher

Association for Computing Machinery

New York, NY, United States

Publication History

Published: 09 June 2004
Published in SIGPLAN Volume 39, Issue 6

Check for updates

Author Tags

  1. genetic algorithms
  2. interactive compilation
  3. phase ordering

Qualifiers

  • Article

Contributors

Other Metrics

Bibliometrics & Citations

Bibliometrics

Article Metrics

  • Downloads (Last 12 months)21
  • Downloads (Last 6 weeks)9
Reflects downloads up to 06 Oct 2024

Other Metrics

Citations

Cited By

View all
  • (2024)Exponentially Expanding the Phase-Ordering Search Space via Dormant InformationProceedings of the 33rd ACM SIGPLAN International Conference on Compiler Construction10.1145/3640537.3641582(250-261)Online publication date: 17-Feb-2024
  • (2024)Enabling Fine-Grained Incremental Builds by Making Compiler StatefulProceedings of the 2024 IEEE/ACM International Symposium on Code Generation and Optimization10.1109/CGO57630.2024.10444865(221-232)Online publication date: 2-Mar-2024
  • (2024)A Two-Stage LLVM Option Sequence Optimization Method to Minimize Energy ConsumptionSwarm and Evolutionary Computation10.1016/j.swevo.2024.10159188(101591)Online publication date: Jul-2024
  • (2024)Tsoa: a two-stage optimization approach for GCC compilation options to minimize execution timeAutomated Software Engineering10.1007/s10515-024-00437-w31:2Online publication date: 1-Nov-2024
  • (2022)Unleashing the power of compiler intermediate representation to enhance neural program embeddingsProceedings of the 44th International Conference on Software Engineering10.1145/3510003.3510217(2253-2265)Online publication date: 21-May-2022
  • (2022)Automating reinforcement learning architecture design for code optimizationProceedings of the 31st ACM SIGPLAN International Conference on Compiler Construction10.1145/3497776.3517769(129-143)Online publication date: 19-Mar-2022
  • (2022)SRTunerProceedings of the 20th IEEE/ACM International Symposium on Code Generation and Optimization10.1109/CGO53902.2022.9741263(118-130)Online publication date: 2-Apr-2022
  • (2022)A Survey of Performance Tuning Techniques and Tools for Parallel ApplicationsIEEE Access10.1109/ACCESS.2022.314784610(15036-15055)Online publication date: 2022
  • (2022)Fast selection of compiler optimizations using performance prediction with graph neural networksConcurrency and Computation: Practice and Experience10.1002/cpe.686935:17Online publication date: 16-Mar-2022
  • (2021)Iterative Compilation Optimization Based on Metric Learning and Collaborative FilteringACM Transactions on Architecture and Code Optimization10.1145/348025019:1(1-25)Online publication date: 6-Dec-2021
  • Show More Cited By

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