skip to main content
research-article
Free Access

Practical exhaustive optimization phase order exploration and evaluation

Published:02 April 2009Publication History
Skip Abstract Section

Abstract

Choosing the most appropriate optimization phase ordering has been a long-standing problem in compiler optimizations. Exhaustive evaluation of all possible orderings of optimization phases for each function is generally dismissed as infeasible for production-quality compilers targeting accepted benchmarks. In this article, we show that it is possible to exhaustively evaluate the optimization phase order space for each function in a reasonable amount of time for most of the functions in our benchmark suite. To achieve this goal, we used various techniques to significantly prune the optimization phase order search space so that it can be inexpensively enumerated in most cases and reduce the number of program simulations required to evaluate program performance for each distinct phase ordering. The techniques described are applicable to other compilers in which it is desirable to find the best phase ordering for most functions in a reasonable amount of time. We also describe some interesting properties of the optimization phase order space, which will prove useful for further studies of related problems in compilers.

References

  1. Agakov, F., Bonilla, E., Cavazos, J., Franke, B., Fursin, G., O'Boyle, M. F. P., Thomson, J., Toussaint, M., and Williams, C. K. I. 2006. Using machine learning to focus iterative optimization. In Proceedings of the International Symposium on Code Generation and Optimization (CGO'06). IEEE, Los Alamitos, CA, 295--305. Google ScholarGoogle ScholarDigital LibraryDigital Library
  2. Almagor, L., Cooper, K. D., Grosul, A., Harvey, T. J., Reeves, S. W., Subramanian, D., Torczon, L., and Waterman, T. 2004. Finding effective compilation sequences. In Proceedings of the ACM SIGPLAN/SIGBED Conference on Languages, Compilers, and Tools for Embedded Systems (LCTES '04). ACM, New York, 231--239. Google ScholarGoogle ScholarDigital LibraryDigital Library
  3. Barr, M. and Massa, A. 2006. Programming Embedded Systems: With C and GNU Development Tools 2nd, Ed. O'Reilly Media, Inc, Sebastopol, CA. Google ScholarGoogle ScholarDigital LibraryDigital Library
  4. Benitez, M. E. and Davidson, J. W. 1988. A portable global optimizer and linker. In Proceedings of the SIGPLAN'88 Conference on Programming Language Design and Implementation. ACM, New York, 329--338. Google ScholarGoogle ScholarDigital LibraryDigital Library
  5. Bodin, F., Kisuki, T., Knijnenburg, P., O'Boyle, M., and Rohou, E. 1998. Iterative compilation in a non-linear optimisation space. In Proceedings of the Workshop on Profile and Feedback Directed Compilation.Google ScholarGoogle Scholar
  6. Burger, D. and Austin, T. M. 1997. The SimpleScalar tool set, version 2.0. SIGARCH Comput. Archit. News 25, 3, 13--25. Google ScholarGoogle ScholarDigital LibraryDigital Library
  7. Cavazos, J. and O'Boyle, M. F. P. 2006. Method-specific dynamic compilation using logistic regression. In Proceedings of the 21st Annual ACM SIGPLAN Conference on Object-oriented Programming Systems, Languages, and Applications (OOPSLA'06). ACM, New York, 229--240. Google ScholarGoogle ScholarDigital LibraryDigital Library
  8. Cooper, K., Grosul, A., Harvey, T., Reeves, S., Subramanian, D., Torczon, L., and Waterman, T. 2005. ACME: Adaptive compilation made efficient. In Proceedings of the ACM SIGPLAN/SIGBED Conference on Languages, Compilers, and Tools for Embedded Systems (LCTES'05). ACM, New York, 69--78. Google ScholarGoogle ScholarDigital LibraryDigital Library
  9. Cooper, K. D., Schielke, P. J., and Subramanian, D. 1999. Optimizing for reduced code space using genetic algorithms. In Proceedings of the Workshop on Languages, Compilers, and Tools for Embedded Systems. ACM, New York, 1--9. Google ScholarGoogle ScholarDigital LibraryDigital Library
  10. Davidson, J. W. and Whalley, D. B. 1991. A design environment for addressing architecture and compiler interactions. Microproces. Microsyst. 15, 9, 459--472.Google ScholarGoogle ScholarCross RefCross Ref
  11. Engblom, J. 2007. Using simulation tools for embedded systems software development. http://www.embedded.com/columns/technicalinsights/199501500?_requestid=111267.Google ScholarGoogle Scholar
  12. Guthaus, M. R., Ringenberg, J. S., Ernst, D., Austin, T. M., Mudge, T., and Brown, R. B. 2001. MiBench: A free, commercially representative embedded benchmark suite. In Proceedings of the IEEE 4th Annual Workshop on Workload Characterization. IEEE, Los Alamitos, CA. Google ScholarGoogle ScholarDigital LibraryDigital Library
  13. Hewlett-Packard. 2000. Parallel programming guide for hp-ux systems. http://docs.hp.com/en/B3909-90003/B3909-90003.pdf (page 74).Google ScholarGoogle Scholar
  14. Hoste, K. and khout, L. E. 2008. Cole: compiler optimization level exploration. In Proceedings of the 6th Annual IEEE/ACM International Symposium on Code Generation and Optimization (CGO'08). ACM, New York, 165--174. Google ScholarGoogle ScholarDigital LibraryDigital Library
  15. Kisuki, T., Knijnenburg, P., and O'Boyle, M. 2000. Combined selection of tile sizes and unroll factors using iterative compilation. In Proceedings of the International Conference on Parallel Architectures and Compilation Techniques. IEEE, Los Alamitos, CA, 237--246. Google ScholarGoogle ScholarDigital LibraryDigital Library
  16. Kisuki, T., Knijnenburg, P., O'Boyle, M., Bodin, F., and Wijshoff, H. 1999. A feasibility study in iterative compilation. In Proceedings of the 8th International Symposium of High-Performance Computing. IEEE, Los Alamitos, CA, 121--132. Google ScholarGoogle ScholarDigital LibraryDigital Library
  17. Knijnenburg, P., Kisuki, T., Gallivan, K., and O'Boyle, M. 2000. The effect of cache models on iterative compilation for combined tiling and unrolling. In Proceedings of 3rd ACM Workshop on Feedback-Directed and Dynamic Optimization. ACM, New York, 31--40.Google ScholarGoogle Scholar
  18. Kulkarni, P., Hines, S., Hiser, J., Whalley, D., Davidson, J., and Jones, D. 2004. Fast searches for effective optimization phase sequences. In Proceedings of the ACM SIGPLAN Conference on Programming Language Design and Implementation. ACM, New York, 171--182. Google ScholarGoogle ScholarDigital LibraryDigital Library
  19. Kulkarni, P., Whalley, D., Tyson, G., and Davidson, J. 2006a. Exhaustive optimization phase order space exploration. In Proceedings of the 4th Annual IEEE/ACM International Symposium on Code Generation and Optimization. IEEE, Los Alamitos, CA, 306--318. Google ScholarGoogle ScholarDigital LibraryDigital Library
  20. Kulkarni, P., Whalley, D., Tyson, G., and Davidson, J. 2006b. In search of near-optimal optimization phase orderings. In Proceedings of the ACM SIGPLAN/SIGBED Conference on Language, Compilers and Tool Support for Embedded Systems (LCTES '06). ACM, New York, 83--92. Google ScholarGoogle ScholarDigital LibraryDigital Library
  21. Kulkarni, P., Whalley, D., Tyson, G., and Davidson, J. 2007. Evaluating heuristic optimization phase order search algorithms. In Proceedings of the IEEE/ACM International Symposium on Code Generation and Optimization. IEEE, Los Alamitos, CA. Google ScholarGoogle ScholarDigital LibraryDigital Library
  22. Kulkarni, P., Zhao, W., Moon, H., Cho, K., Whalley, D., Davidson, J., Bailey, M., Paek, Y., and Gallivan, K. 2003. Finding effective optimization phase sequences. In Proceedings of the ACM SIGPLAN Conference on Languages, Compilers, and Tools for Embedded Systems (LCTES '03). ACM, New York, 12--23. Google ScholarGoogle ScholarDigital LibraryDigital Library
  23. Kulkarni, P. A., Hines, S. R., Whalley, D. B., Hiser, J. D., Davidson, J. W., and Jones, D. L. 2005. Fast and efficient searches for effective optimization-phase sequences. ACM Trans. Archit. Code Optimiz. 2, 2, 165--198. Google ScholarGoogle ScholarDigital LibraryDigital Library
  24. Peterson, W. and Brown, D. 1961. Cyclic codes for error detection. In Proceedings of the Institute of Radio Engineers. 49, 228--235.Google ScholarGoogle Scholar
  25. Redhat. 2004. Gnupro 04r1 tools for embedded systems development. http://www.redhat.com/f/pdf/GNUPro-04r1-Embedded-AnnouncementLetter.pdf.Google ScholarGoogle Scholar
  26. Touati, S.-A.-A. and Barthou, D. 2006. On the decidability of phase ordering problem in optimizing compilation. In Proceedings of the 3rd Conference on Computing Frontiers (CF'06). ACM, New York, 147--156. Google ScholarGoogle ScholarDigital LibraryDigital Library
  27. Triantafyllis, S., Vachharajani, M., Vachharajani, N., and August, D. I. 2003. Compiler optimization-space exploration. In Proceedings of the International Symposium on Code Generation and Optimization. IEEE, Los Alamitos, CA, 204--215. Google ScholarGoogle ScholarDigital LibraryDigital Library
  28. Vegdahl, S. R. 1982. Phase coupling and constant generation in an optimizing microcode compiler. In Proceedings of the 15th Annual Workshop on Microprogramming. IEEE, Los Alamitos, CA, 125--133. Google ScholarGoogle ScholarDigital LibraryDigital Library
  29. Virtutech. 2008. Virtualized software development white paper. http://www.virtutech.com/files/whitepapers/wp_simics.pdf.Google ScholarGoogle Scholar
  30. Wagner, T. A., Maverick, V., Graham, S. L., and Harrison, M. A. 1994. Accurate static estimators for program optimization. SIGPLAN Notices 29, 6, 85--96. Google ScholarGoogle ScholarDigital LibraryDigital Library
  31. Weisstein, E. W. 2006. Correlation coefficient. from MathWorld—A Wolfram Web Resource. http://mathworld.wolfram.com/CorrelationCoefficient.html.Google ScholarGoogle Scholar
  32. Whitfield, D. L. and Soffa, M. L. 1990. An approach to ordering optimizing transformations. In Proceedings of the 2nd ACM SIGPLAN Symposium on Principles & Practice of Parallel Programming. ACM, New York, 137--146. Google ScholarGoogle ScholarDigital LibraryDigital Library
  33. Whitfield, D. L. and Soffa, M. L. 1997. An approach for exploring code improving transformations. ACM Trans. Program. Lang. Syst. 19, 6, 1053--1084. Google ScholarGoogle ScholarDigital LibraryDigital Library
  34. Zhao, M., Childers, B., and Soffa, M. L. 2003. Predicting the impact of optimizations for embedded systems. In Proceedings of the ACM SIGPLAN Conference on Language, Compiler, and Tool for Embedded Systems (LCTES '03). ACM, New York, 1--11. Google ScholarGoogle ScholarDigital LibraryDigital Library
  35. Zhao, M., Childers, B., and Soffa, M. L. 2005. A model-based framework: An approach for profit-driven optimization. In Proceedings of the International Symposium on Code Generation and Optimization. IEEE, Los Alamitos, CA, 317--327. Google ScholarGoogle ScholarDigital LibraryDigital Library

Index Terms

  1. Practical exhaustive optimization phase order exploration and evaluation

        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

        Full Access

        • Published in

          cover image ACM Transactions on Architecture and Code Optimization
          ACM Transactions on Architecture and Code Optimization  Volume 6, Issue 1
          March 2009
          127 pages
          ISSN:1544-3566
          EISSN:1544-3973
          DOI:10.1145/1509864
          Issue’s Table of Contents

          Copyright © 2009 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: 2 April 2009
          • Accepted: 1 September 2008
          • Revised: 1 August 2008
          • Received: 1 March 2008
          Published in taco Volume 6, Issue 1

          Permissions

          Request permissions about this article.

          Request Permissions

          Check for updates

          Qualifiers

          • research-article
          • Research
          • Refereed

        PDF Format

        View or Download as a PDF file.

        PDF

        eReader

        View online with eReader.

        eReader