International Journal of Parallel Programming

, Volume 39, Issue 3, pp 296–327

Milepost GCC: Machine Learning Enabled Self-tuning Compiler

  • Grigori Fursin
  • Yuriy Kashnikov
  • Abdul Wahid Memon
  • Zbigniew Chamski
  • Olivier Temam
  • Mircea Namolaru
  • Elad Yom-Tov
  • Bilha Mendelson
  • Ayal Zaks
  • Eric Courtois
  • Francois Bodin
  • Phil Barnard
  • Elton Ashton
  • Edwin Bonilla
  • John Thomson
  • Christopher K. I. Williams
  • Michael O’Boyle
Article

DOI: 10.1007/s10766-010-0161-2

Cite this article as:
Fursin, G., Kashnikov, Y., Memon, A.W. et al. Int J Parallel Prog (2011) 39: 296. doi:10.1007/s10766-010-0161-2

Abstract

Tuning compiler optimizations for rapidly evolving hardware makes porting and extending an optimizing compiler for each new platform extremely challenging. Iterative optimization is a popular approach to adapting programs to a new architecture automatically using feedback-directed compilation. However, the large number of evaluations required for each program has prevented iterative compilation from widespread take-up in production compilers. Machine learning has been proposed to tune optimizations across programs systematically but is currently limited to a few transformations, long training phases and critically lacks publicly released, stable tools. Our approach is to develop a modular, extensible, self-tuning optimization infrastructure to automatically learn the best optimizations across multiple programs and architectures based on the correlation between program features, run-time behavior and optimizations. In this paper we describe Milepost GCC, the first publicly-available open-source machine learning-based compiler. It consists of an Interactive Compilation Interface (ICI) and plugins to extract program features and exchange optimization data with the cTuning.org open public repository. It automatically adapts the internal optimization heuristic at function-level granularity to improve execution time, code size and compilation time of a new program on a given architecture. Part of the MILEPOST technology together with low-level ICI-inspired plugin framework is now included in the mainline GCC. We developed machine learning plugins based on probabilistic and transductive approaches to predict good combinations of optimizations. Our preliminary experimental results show that it is possible to automatically reduce the execution time of individual MiBench programs, some by more than a factor of 2, while also improving compilation time and code size. On average we are able to reduce the execution time of the MiBench benchmark suite by 11% for the ARC reconfigurable processor. We also present a realistic multi-objective optimization scenario for Berkeley DB library using Milepost GCC and improve execution time by approximately 17%, while reducing compilation time and code size by 12% and 7% respectively on Intel Xeon processor.

Keywords

Machine learning compiler Self-tuning compiler Adaptive compiler Automatic performance tuning Machine learning Program characterization Program features Collective optimization Continuous optimization Multi-objective optimization Empirical performance tuning Optimization repository Iterative compilation Feedback-directed compilation Adaptive compilation Optimization prediction Portable optimization 

Copyright information

© Springer Science+Business Media, LLC 2011

Authors and Affiliations

  • Grigori Fursin
    • 1
    • 2
  • Yuriy Kashnikov
    • 2
  • Abdul Wahid Memon
    • 2
  • Zbigniew Chamski
    • 1
  • Olivier Temam
    • 1
  • Mircea Namolaru
    • 3
  • Elad Yom-Tov
    • 3
  • Bilha Mendelson
    • 3
  • Ayal Zaks
    • 3
  • Eric Courtois
    • 4
  • Francois Bodin
    • 4
  • Phil Barnard
    • 5
  • Elton Ashton
    • 5
  • Edwin Bonilla
    • 6
  • John Thomson
    • 6
  • Christopher K. I. Williams
    • 6
  • Michael O’Boyle
    • 6
  1. 1.INRIA Saclay, Parc Club Orsay UniversiteOrsayFrance
  2. 2.University of Versailles Saint Quentin en YvelinesVersaillesFrance
  3. 3.IBM Research LabHaifa University CampusHaifaIsrael
  4. 4.CAPS EntrepriseRennesFrance
  5. 5.ARC InternationalSt. AlbansUK
  6. 6.University of Edinburgh, Informatics ForumEdinburghUK

Personalised recommendations