Nothing Special   »   [go: up one dir, main page]

Skip to main content

Efficient Program Compilation Through Machine Learning Techniques

  • Chapter
  • First Online:
Software Automatic Tuning

Abstract

The wealth of available compiler optimizations leads to the dual problems of finding the best set of optimizations and the best heuristic parameters to tune each optimization. We describe how machine learning techniques, such as logistic regression, can be used to address these problems. We focus on decreasing the compile time for a static commercial compiler, while preserving the execution time. We show that we can speed up the compile process by at least a factor of two with almost the same generated code quality on the SPEC2000 benchmark suite, and that our logistic classifier achieves the same prediction quality for non-SPEC benchmarks.

This is a preview of subscription content, log in via an institution to check access.

Access this chapter

Subscribe and save

Springer+ Basic
$34.99 /Month
  • Get 10 units per month
  • Download Article/Chapter or eBook
  • 1 Unit = 1 Article or 1 Chapter
  • Cancel anytime
Subscribe now

Buy Now

Chapter
USD 29.95
Price excludes VAT (USA)
  • Available as PDF
  • Read on any device
  • Instant download
  • Own it forever
eBook
USD 129.00
Price excludes VAT (USA)
  • Available as EPUB and PDF
  • Read on any device
  • Instant download
  • Own it forever
Softcover Book
USD 169.99
Price excludes VAT (USA)
  • Compact, lightweight edition
  • Dispatched in 3 to 5 business days
  • Free shipping worldwide - see info
Hardcover Book
USD 169.99
Price excludes VAT (USA)
  • Durable hardcover edition
  • Dispatched in 3 to 5 business days
  • Free shipping worldwide - see info

Tax calculation will be finalised at checkout

Purchases are for personal use only

Institutional subscriptions

Similar content being viewed by others

Notes

  1. 1.

    Different optimization levels (e.g., -O2, -O3) can be used to trade off compile time and code quality, but all selected transformations are applied to the whole program.

  2. 2.

    These may well represent a local optimum, not the globally optimal values.

References

  1. Agakov F, Bonilla E, Cavazos J, et al. (2006) Using machine learning to focus iterative optimization. In Proceedings of the 4th international symposium on code generation and optimization (CGO’06), March 2006, pp 295–305

    Google Scholar 

  2. Calder B, Grunwald D, Jones M, Lindsay D, Martin J, Mozer M, Zorn B (1997) Evidence-based static branch prediction using machine learning. ACM Trans Program Lang Syst 19(1):188–222

    Article  Google Scholar 

  3. Cavazos J, Fursin G, Agakov F et al. (2007) Rapidly selecting good compiler optimizations using performance counters. In Proceedings of the 2007 international symposium on code generation and optimization (CGO ’07), March 2007, pp 185–197

    Google Scholar 

  4. Cavazos J, O’Boyle MFP (2006) Method-specific dynamic compilation using logistic regression. In Proceedings of OOPSLA ’06, October 2006, pp 229–240

    Google Scholar 

  5. Cooper KD, Subramanian D, Torczon L (2002) Adaptive optimizing compilers for the 21st century. J Supercomput 23(1):7–22

    Article  MATH  Google Scholar 

  6. Fursin G, Miranda C, Temam O, Namolaru M, Yom-Tov E, Zaks A, Mendelson B, Barnard P, Ashton E, Courtois E, Bodin F, Bonilla E, Thomson J, Leather H, Williams C, O’Boyle M (2008) MILEPOST GCC: Machine-learning-based research compiler. In Proceedings of the GCC Developers’ Summit, June 2008

    Google Scholar 

  7. ORC (2008) Open Research Compiler for Itanium Processor Family. http://ipf-orc.sourceforge.net/

  8. PathScale (2004) EKOPath compilers. http://www.pathscale.com/

  9. Pan Z, Eigenmann R (2006) Fast, automatic, procedure-level performance tuning. In Proceedings of the 15th International Conference on Parallel Architecture and Compilation Techniques (PACT’06), September 2006, pp 173–181

    Google Scholar 

  10. Pekhimenko G (2008) Machine learning algorithms for choosing compiler heuristics. Master’s thesis, University of Toronto http://csng.cs.toronto.edu/publication_files/174/pgen_thesis.pdf.

  11. Stephenson M, Amarasinghe S (2005) Predicting unroll factors using supervised classification. In Proceedings of the 2005 international symposium on code generation and optimization (CGO’05), March 2005, pp 123–134

    Google Scholar 

  12. Stephenson M, Amarasinghe S, Martin M, O’Reilly UM (2003) Meta optimization: improving compiler heuristics with machine learning. In Proceedings of the 2003 ACM SIGPLAN Conference on Programing Language Design and Implimentation (PLDI ’03), June 2003, pp 77–90

    Google Scholar 

  13. Seymour K, You H, Dongarra J (2008) A comparison of search heuristics for empirical code optimization. In Proceedings of the 2008 IEEE international conference on cluster computing (3rd Intl Wkshp on Automatic Perf. Tuning), pp 421–429

    Google Scholar 

  14. Standard Performance Evaluation Corporation (2000) SPEC CPU2000 benchmarks. http://www.spec.org/cpu2000/

  15. Tal A (2007) Method and system for managing heuristic properties. US Patent Application No. 20070089104, 19 April 2007

    Google Scholar 

Download references

Author information

Authors and Affiliations

Authors

Corresponding author

Correspondence to Gennady Pekhimenko .

Editor information

Editors and Affiliations

Rights and permissions

Reprints and permissions

Copyright information

© 2011 Springer New York

About this chapter

Cite this chapter

Pekhimenko, G., Brown, A.D. (2011). Efficient Program Compilation Through Machine Learning Techniques. In: Naono, K., Teranishi, K., Cavazos, J., Suda, R. (eds) Software Automatic Tuning. Springer, New York, NY. https://doi.org/10.1007/978-1-4419-6935-4_19

Download citation

  • DOI: https://doi.org/10.1007/978-1-4419-6935-4_19

  • Published:

  • Publisher Name: Springer, New York, NY

  • Print ISBN: 978-1-4419-6934-7

  • Online ISBN: 978-1-4419-6935-4

  • eBook Packages: EngineeringEngineering (R0)

Publish with us

Policies and ethics