Skip to main content

Automatic Configuration of GCC Using Irace

  • Conference paper
  • First Online:
Artificial Evolution (EA 2017)

Part of the book series: Lecture Notes in Computer Science ((LNTCS,volume 10764))

Abstract

Automatic algorithm configuration techniques have proved to be successful in finding performance-optimizing parameter settings of many search-based decision and optimization algorithms. A recurrent, important step in software development is the compilation of source code written in some programming language into machine-executable code. The generation of performance-optimized machine code itself is a difficult task that can be parametrized in many different possible ways. While modern compilers usually offer different levels of optimization as possible defaults, they have a larger number of other flags and numerical parameters that impact properties of the generated machine-code. While the generation of performance-optimized machine code has received large attention and is dealt with in the research area of auto-tuning, the usage of standard automatic algorithm configuration software has not been explored, even though, as we show in this article, the performance of the compiled code has significant stochasticity, just as standard optimization algorithms. As a practical case study, we consider the configuration of the well-known GNU compiler collection (GCC) for minimizing the run-time of machine code for various heuristic search methods. Our experimental results show that, depending on the specific code to be optimized, improvements of up to 40% of execution time when compared to the -O2 and -O3 optimization flags is possible.

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

Access this chapter

Chapter
USD 29.95
Price excludes VAT (USA)
  • Available as PDF
  • Read on any device
  • Instant download
  • Own it forever
eBook
USD 39.99
Price excludes VAT (USA)
  • Available as EPUB and PDF
  • Read on any device
  • Instant download
  • Own it forever
Softcover Book
USD 54.99
Price excludes VAT (USA)
  • Compact, lightweight 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

Notes

  1. 1.

    The GCC optimization options are available at https://gcc.gnu.org/onlinedocs/gcc-7.1.0/gcc/Optimize-Options.html and the parameter definition can be obtained in the params.def file in the source code of GCC.

References

  1. Ansel, J., Kamil, S., Veeramachaneni, K., Ragan-Kelley, J., Bosboom, J., O’Reilly, U.M., Amarasinghe, S.: OpenTuner: an extensible framework for program autotuning. In: Proceedings of the 23rd International Conference on Parallel Architectures and Compilation, pp. 303–315. ACM, New York (2014)

    Google Scholar 

  2. Ansótegui, C., Sellmann, M., Tierney, K.: A gender-based genetic algorithm for the automatic configuration of algorithms. In: Gent, I.P. (ed.) CP 2009. LNCS, vol. 5732, pp. 142–157. Springer, Heidelberg (2009). https://doi.org/10.1007/978-3-642-04244-7_14

    Chapter  Google Scholar 

  3. Birattari, M., Yuan, Z., Balaprakash, P., Stützle, T.: F-race and iterated F-race: an overview. In: Bartz-Beielstein, T., Chiarandini, M., Paquete, L., Preuss, M. (eds.) Experimental Methods for the Analysis of Optimization Algorithms, pp. 311–336. Springer, Heidelberg (2010). https://doi.org/10.1007/978-3-642-02538-9_13

    Chapter  Google Scholar 

  4. Blackmore, C., Ray, O., Eder, K.: Automatically tuning the GCC compiler to optimize the performance of applications running on the ARM cortex-M3. Technical report, CoRR (2017). https://arxiv.org/abs/1703.08228

  5. Christen, M., Schenk, O., Burkhart, H.: PATUS: a code generation and autotuning framework for parallel iterative stencil computations on modern microarchitectures. In: Proceedings of the 2011 IEEE International Parallel & Distributed Processing Symposium, IPDPS 2011, pp. 676–687. IEEE Computer Society (2011)

    Google Scholar 

  6. Frigo, M., Johnson, S.G.: The design and implementation of FFTW3. Proc. IEEE 93(2), 216–231 (2005). Special Issue on “Program Generation, Optimization, and Platform Adaptation”

    Article  Google Scholar 

  7. Fursin, G., Kashnikov, Y., Memon, A.W., Chamski, Z., Temam, O., Namolaru, M., Yom-Tov, E., Mendelson, B., Zaks, A., Courtois, E., Bodin, F., Barnard, P., Ashton, E., Bonilla, E., Thomson, J., Williams, C.K.I., O’Boyle, M.: Milepost GCC: machine learning enabled self-tuning compiler. Int. J. Parallel Prog. 39(3), 296–327 (2011)

    Article  Google Scholar 

  8. GNU Project, Free Software Foundation: GCC, the GNU compiler collection (1987). https://www.gcc.gnu.org

  9. Helsgaun, K.: An effective implementation of the Lin-Kernighan traveling salesman heuristic. Eur. J. Oper. Res. 126, 106–130 (2000)

    Article  MathSciNet  MATH  Google Scholar 

  10. Helsgaun, K.: General \(k\)-opt submoves for the Lin-Kernighan TSP heuristic. Math. Program. Comput. 1(2–3), 119–163 (2009)

    Article  MathSciNet  MATH  Google Scholar 

  11. Henning, J.L.: SPEC CPU2000: measuring CPU performance in the new millennium. Computer 33(7), 28–35 (2000)

    Article  Google Scholar 

  12. Hoos, H.H.: Automated algorithm configuration and parameter tuning. In: Hamadi, Y., Monfroy, E., Saubion, F. (eds.) Autonomous Search, pp. 37–71. Springer, Heidelberg (2011). https://doi.org/10.1007/978-3-642-21434-9_3

    Chapter  Google Scholar 

  13. Hoste, K., Eeckhout, L.: Cole: compiler optimization level exploration. In: Proceedings of the 6th Annual IEEE/ACM International Symposium on Code Generation and Optimization, CGO 2008, pp. 165–174. ACM Press, New York (2008)

    Google Scholar 

  14. Hutter, F., Hoos, H.H., Leyton-Brown, K.: Sequential model-based optimization for general algorithm configuration. In: Coello, C.A.C. (ed.) LION 2011. LNCS, vol. 6683, pp. 507–523. Springer, Heidelberg (2011). https://doi.org/10.1007/978-3-642-25566-3_40

    Chapter  Google Scholar 

  15. Hutter, F., Hoos, H.H., Leyton-Brown, K., Stützle, T.: ParamILS: an automatic algorithm configuration framework. J. Artif. Intell. Res. 36, 267–306 (2009)

    MATH  Google Scholar 

  16. Ladd, S.R.: ACOVEA (Analysis of compiler options via evolutionary algorithm) (2000). https://github.com/Acovea/libacovea

  17. López-Ibáñez, M., Dubois-Lacoste, J., Pérez Cáceres, L., Stützle, T., Birattari, M.: The irace package: iterated racing for automatic algorithm configuration. Operat. Res. Perspect. 3, 43–58 (2016)

    Article  MathSciNet  Google Scholar 

  18. Pérez Cáceres, L., Bischl, B., Stützle, T.: Evaluating random forest models for irace. In: GECCO 2017 Companion. ACM Press (2017)

    Google Scholar 

  19. Pérez Cáceres, L., Pagnozzi, F., Franzin, A., Stützle, T.: Automatic configuration of GCC using irace: supplementary material (2017). http://iridia.ulb.ac.be/supp/IridiaSupp2017-009/

  20. Plotnikov, D., Melnik, D., Vardanyan, M., Buchatskiy, R., Zhuykov, R., Lee, J.H.: Automatic tuning of compiler optimizations and analysis of their impact. In: Alexandrov, V., et al. (eds.) 2013 International Conference on Computational Science. Procedia Computer Science, vol. 18, pp. 1312–1321. Elsevier, Amsterdam (2013)

    Google Scholar 

  21. Püschel, M., Franchetti, F., Voronenko, Y.: Spiral. In: Padua, D. (ed.) Encyclopedia of Parallel Computing, pp. 1920–1933. Springer, Boston (2011). https://doi.org/10.1007/978-0-387-09766-4_244

    Google Scholar 

  22. Siegel, S., Castellan Jr., N.J.: Non Parametric Statistics for the Behavioral Sciences, 2nd edn. McGraw Hill, New York (1988)

    Google Scholar 

  23. Stützle, T.: ACOTSP: a software package of various ant colony optimization algorithms applied to the symmetric traveling salesman problem (2002). http://www.aco-metaheuristic.org/aco-code/

  24. Stützle, T., López-Ibáñez, M.: Automatic (offline) configuration of algorithms. In: Laredo, J.L.J., et al. (eds.) GECCO (Companion), pp. 681–702. ACM Press, New York (2015)

    Chapter  Google Scholar 

  25. Whaley, C.R.: Atlas (automatically tuned linear algebra software). In: Padua, D. (ed.) Encyclopedia of Parallel Computing, pp. 95–101. Springer, Boston (2011). https://doi.org/10.1007/978-0-387-09766-4

    Google Scholar 

  26. Wright, M.N., Ziegler, A.: ranger: a fast implementation of random forests for high dimensional data in C++ and R. Arxiv preprint arXiv:1508.04409 [stat.ML] (2015)

  27. Zitzler, E., Laumanns, M., Thiele, L.: SPEA2: improving the strength pareto evolutionary algorithm for multiobjective optimization. In: Giannakoglou, K.C., et al. (eds.) EUROGEN, pp. 95–100. CIMNE, Barcelona (2002)

    Google Scholar 

Download references

Acknowledgments

We acknowledge support from the COMEX project (P7/36) within the IAP Programme of the BelSPO. Thomas Stützle acknowledges support from the Belgian F.R.S.-FNRS, of which he is a senior research associate. The authors would like to thank Manuel López-Ibáñez for his many helpful remarks and assistance.

Author information

Authors and Affiliations

Authors

Corresponding author

Correspondence to Leslie Pérez Cáceres .

Editor information

Editors and Affiliations

Rights and permissions

Reprints and permissions

Copyright information

© 2018 Springer International Publishing AG, part of Springer Nature

About this paper

Check for updates. Verify currency and authenticity via CrossMark

Cite this paper

Pérez Cáceres, L., Pagnozzi, F., Franzin, A., Stützle, T. (2018). Automatic Configuration of GCC Using Irace. In: Lutton, E., Legrand, P., Parrend, P., Monmarché, N., Schoenauer, M. (eds) Artificial Evolution. EA 2017. Lecture Notes in Computer Science(), vol 10764. Springer, Cham. https://doi.org/10.1007/978-3-319-78133-4_15

Download citation

  • DOI: https://doi.org/10.1007/978-3-319-78133-4_15

  • Published:

  • Publisher Name: Springer, Cham

  • Print ISBN: 978-3-319-78132-7

  • Online ISBN: 978-3-319-78133-4

  • eBook Packages: Computer ScienceComputer Science (R0)

Publish with us

Policies and ethics