skip to main content
10.1145/1356058.1356080acmconferencesArticle/Chapter ViewAbstractPublication PagescgoConference Proceedingsconference-collections
research-article

Cole: compiler optimization level exploration

Published:06 April 2008Publication History

ABSTRACT

Modern compilers implement a large number of optimizations which all interact in complex ways, and which all have a different impact on code quality, compilation time, code size, energy consumption, etc. For this reason, compilers typically provide a limited number of standard optimization levels, such as -O1, -O2, -O3 and -Os, that combine various optimizations providing a number of trade-offs between multiple objective functions (such as code quality, compilation time and code size). The construction of these optimization levels, i.e., choosing which optimizations to activate at each level, is a manual process typically done using high-level heuristics based on the compiler developer's experience.

This paper proposes COLE, Compiler Optimization Level Exploration, a framework for automatically finding Pareto optimal optimization levels through multi-objective evolutionary searching. Our experimental results using GCC and the SPEC CPU benchmarks show that the automatic construction of optimization levels is feasible in practice, and in addition, yields better optimization levels than GCC's manually derived (-Os, -O1, -O2 and -O3) optimization levels, as well as the optimization levels obtained through random sampling. We also demonstrate that COLE can be used to gain insight into the effectiveness of compiler optimizations as well as to better understand a benchmark's sensitivity to compiler optimizations.

References

  1. F. Agakov, E. Bonilla, J. Cavazos, B.Franke, G. Fursin, M. O'Boyle, J. Thomson, M. Toussaint, and C. Williams. Using machine learning to focus iterative optimization. In Proceedings of the International Symposium on Code Generation and Optimization (CGO), pages 295--305, Mar. 2006. Google ScholarGoogle ScholarDigital LibraryDigital Library
  2. L. Almagor, K. D. Cooper, A. Grosul, T. J. Harvey, S. Reeves, D. Subramanian, L. Torczon, and T. Waterman. Compilation order matters: Exploring the structure of the space of compilation sequences using randomized search algorithms. In Proceedings of the ACM SIGPLAN Symposium on Languages, Compilers, and Tools for Embedded Systems (LCTES), pages 231--239, June 2004.Google ScholarGoogle Scholar
  3. M. Arnold, S. Finka, D. Grove, M. Hind, and P. F. Sweeney. Adaptive optimization in the Jalapeno JVM. In Proceedings of the ACM SIGPLAN Conference on Object-Oriented Programming Systems, Languages, and Applications (OOPSLA), pages 47--65, Oct. 2000. Google ScholarGoogle ScholarDigital LibraryDigital Library
  4. M. Arnold, M. Hind, and B. G. Ryder. Online feedback--directed optimization in Java. In Proceedings of the ACM SIGPLAN Conference on Object-Oriented Programming Systems, Languages, and Applications (OOPSLA), pages 111--129, Oct. 2002. Google ScholarGoogle ScholarDigital LibraryDigital Library
  5. F. Bodin, T. Kisuki, P. Knijnenburg, M. O'Boyle, and E. Rohou. Iterative compilation in a non-linear optimisation space. In Proceedings of the Workshop on Profile and Feedback-Directed Compilation, in Conjunction with the Intl. Conf. on Parallel Architectures and Compilation Techniques (PACT), Oct. 1998.Google ScholarGoogle Scholar
  6. J. Cavazos, G. Fursin, F. Agakov, E. Bonilla, M. F. P. O'Boyle, and O. Temam. Rapidly selecting good compiler optimizations using performance counters. In Proceedings of the International Symposium on Code Generation and Optimization (CGO), pages 185--197, Mar. 2007. Google ScholarGoogle ScholarDigital LibraryDigital Library
  7. J. Cavazos and M. O'Boyle. Automatic tuning of inlining heuristics. In Proceedings of the Supercomputing Conference on High Performance Networking and Computing, Nov. 2005. Google ScholarGoogle ScholarDigital LibraryDigital Library
  8. J. Cavazos and M. O'Boyle. Method-specific dynamic compilation using logistic regression. In Proceedings of the ACM SIGPLAN Conference on Object--Oriented Programming Systems, Languages, and Applications (OOPSLA), pages 229--240, Oct. 2006. Google ScholarGoogle ScholarDigital LibraryDigital Library
  9. K. Chow and Y. Wu. Feedback-directed selection and characterization of compiler optimizations. In Proceedings of the Workshop on Feedback--Directed and Dynamic Optimization (FDDO), Nov. 1999.Google ScholarGoogle Scholar
  10. K. D. Cooper, P. J. Schielke, and D. Subramanian. Optimizing for reduced code space using genetic algorithms. In Proceedings of the ACM SIGPLAN/SIGBED Conference on Languages, Compilers, and Tools for Embedded Systems (LCTES), pages 1--9, May 1999. Google ScholarGoogle ScholarDigital LibraryDigital Library
  11. K. Deb. Multi-Objective Optimization using Evolutionary Algorithms. Wiley, 2001. Google ScholarGoogle ScholarDigital LibraryDigital Library
  12. G. Fursin, A. Cohen, M. O'Boyle, and O. Temam. Quick and practical run--time evaluation of multiple program optimizations. Transactions on High Performance Embedded Architectures and Compilation Techniques (HiPEAC), 1(1):13--31, 2006.Google ScholarGoogle Scholar
  13. S. V. Gheorghita, H. Corporaal, and T. Basten. Iterative compilation for energy reduction. Journal of Embedded Computing}, 1(4):509--520, July 2005. Google ScholarGoogle ScholarDigital LibraryDigital Library
  14. E. Granston and A. Holler. Automatic recommendation of compiler options. In Proceedings of the Workshop on Feedback-Directed and Dynamic Optimization (FDDO), Dec. 2001.Google ScholarGoogle Scholar
  15. M. Haneda, P. M. W. Knijnenburg, and H. A. G. Wijshoff. Optimizing general purpose compiler optimization. In Proceedings of the International Conference on Computing Frontiers, pages 180---188, May 2005. Google ScholarGoogle ScholarDigital LibraryDigital Library
  16. J. L. Henning. SPEC CPU2000: Measuring CPU performance in the new millennium. IEEE Computer, 33(7):28--35, July 2000. Google ScholarGoogle ScholarDigital LibraryDigital Library
  17. K. Ishizaki, T. M., K. Kawachiya, T. Suganuma, O. Gohda, T. Inagaki, A. Koseki, K. Ogata, M. Kawahito, T. Yasue, T. Ogasawara, T. Onodera, H. Komatsu, and T. Nakatani. Effectiveness of cross-platform optimizations for a Java just-in-time compiler. In Proceedings of the ACM SIGPLAN Conference on Object--Oriented Programming Systems, Languages, and Applications (OOPSLA), pages 187--204, Oct. 2003. Google ScholarGoogle ScholarDigital LibraryDigital Library
  18. 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 Conference on Programming Language Design and Implementation (PLDI), pages 171--182, June 2004. Google ScholarGoogle ScholarDigital LibraryDigital Library
  19. D. Maier, P. Ramarao, M. Stoodley, and V. Sundaresan. Experiences with multithreading and dynamic class loading in a Java just-in-time compiler. In Proceedings of the International Symposium on Code Generation and Optimization (CGO), pages 87--97, Mar. 2006. Google ScholarGoogle ScholarDigital LibraryDigital Library
  20. Z. Pan and R. Eigenmann. Fast, automatic, procedure-level performance tuning. In Proceedings of the International Conference on Parallel Architectures and Compilation Techniques (PACT), pages 173--181, Sept. 2006. Google ScholarGoogle ScholarDigital LibraryDigital Library
  21. T. Suganuma, T. Yasue, M. Kawahito, H. Komatsu, and T. Nakatani. Design and evaluation of dynamic optimizations for a Java just-in-time compiler. ACM Transactions on Programming Languages and Systems (TOPLAS), 27(4):732---785, July 2005. Google ScholarGoogle ScholarDigital LibraryDigital Library
  22. S. Triantafyllis, M. Vachharajani, and D. I. August. Compiler optimization--space exploration. Journal of Instruction--level Parallelism, Jan. 2005. Accessible at http://www.jilp.org/vol7.Google ScholarGoogle Scholar
  23. H. Wu, E. Park, M. Kaplarevic, and Y. Zhang. Dynamic optimization option search in GCC. In Proceedings of the GCC Developers Summit 2007, June 2007.Google ScholarGoogle Scholar
  24. M. Zhao, B. R. Childers, and M. L. Soffa. Predicting the impact of optimizations for embedded systems. In Proceedings of the ACM SIGPLAN Symposium on Languages, Compilers, and Tools for Embedded Systems (LCTES), pages 1--11, June 2003. Google ScholarGoogle ScholarDigital LibraryDigital Library
  25. E. Zitzler, M. Laumanns, and L. Thiele. SPEA2: Improving the strength pareto evolutionary algorithm. Technical Report TIK--Report 103, Swiss Federal Institute of Technology (ETH) Zurich, May 2001.Google ScholarGoogle Scholar
  26. E. Zitzler and L. Thiele. Multiobjective evolutionary algorithms: A comparative case study and the strength perato approach. IEEE Transactions on Evolutionary Computation, 3(4):257--271, Nov. 1999. Google ScholarGoogle ScholarDigital LibraryDigital Library

Index Terms

  1. Cole: compiler optimization level exploration

    Recommendations

    Comments

    Login options

    Check if you have access through your login credentials or your institution to get full access on this article.

    Sign in
    • Published in

      cover image ACM Conferences
      CGO '08: Proceedings of the 6th annual IEEE/ACM international symposium on Code generation and optimization
      April 2008
      235 pages
      ISBN:9781595939784
      DOI:10.1145/1356058

      Copyright © 2008 ACM

      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: 6 April 2008

      Permissions

      Request permissions about this article.

      Request Permissions

      Check for updates

      Qualifiers

      • research-article

      Acceptance Rates

      CGO '08 Paper Acceptance Rate21of66submissions,32%Overall Acceptance Rate312of1,061submissions,29%

    PDF Format

    View or Download as a PDF file.

    PDF

    eReader

    View online with eReader.

    eReader