Advertisement

On the Determination of Inlining Vectors for Program Optimization

  • Rosario Cammarota
  • Alexandru Nicolau
  • Alexander V. Veidenbaum
  • Arun Kejariwal
  • Debora Donato
  • Mukund Madhugiri
Part of the Lecture Notes in Computer Science book series (LNCS, volume 7791)

Abstract

In this paper we propose a new technique and a framework to select inlining heuristic constraints - referred to as an inlining vector, for program optimization. The proposed technique uses machine learning to model the correspondence between inlining vectors and performance (completion time). The automatic selection of a machine learning algorithm to build such a model is part of our technique and we present a rigorous selection procedure. Subject to a given architecture, such a model evaluates the benefit of inlining combined with other global optimizations and selects an inlining vector that, in the limits of the model, minimizes the completion time of a program.

We conducted our experiments using the GNU GCC compiler and optimized 22 combinations (program, input) from SPEC CINT2006 on the state-of-the-art Intel Xeon Westmere architecture. Compared with optimization level, i.e., -O3, our technique yields performance improvements ranging from 2% to 9%.

Keywords

Completion Time Absolute Error Support Vector Regression Program Optimization Regression Algorithm 
These keywords were added by machine and not by the authors. This process is experimental and the keywords may be updated as the learning algorithm improves.

References

  1. 1.
    Davidson, J.W., Holler, A.M.: A study of a C function inliner. Software: Practice and Experience 18(8) (1988)Google Scholar
  2. 2.
    Ball, J.E.: Predicting the effects of optimization on a procedure body. In: Proceedings of the 1979 SIGPLAN Symposium on Compiler Construction (1979)Google Scholar
  3. 3.
    Cooper, K.D., Hall, M.W., Torczon, L.: An experiment with inline substitution. Softw. Pract. Exper. 21(6) (May 1991)Google Scholar
  4. 4.
    Cooper, K.D., Hall, M.W., Torczon, L.: Unexpected side effects of inline substitution: a case study. ACM Lett. Program. Lang. Syst. 1(1) (March 1992)Google Scholar
  5. 5.
    Guo, J., Stiles, M., Yi, Q., Psarris, K.: Enhancing the role of inlining in effective interprocedural parallelization. In: Proceedings of the International Conference on Parallel Processing (2011)Google Scholar
  6. 6.
    Allen, R., Johnson, S.: Compiling C for vectorization, parallelization, and inline expansion. In: Proceedings of the ACM SIGPLAN Conference on Programming Language Design and Implementation (1988)Google Scholar
  7. 7.
    Scheifler, R.W.: An analysis of inline substitution for a structured programming language. Commun. ACM 20(9) (September 1977)Google Scholar
  8. 8.
    Garey, M.R., Johnson, D.S.: Computers and Intractability: A Guide to the Theory of NP-Completeness. W. H. Freeman (1979)Google Scholar
  9. 9.
    Cavazos, J., O’Boyle, M.F.P.: Automatic tuning of inlining heuristics. In: Proceedings of the ACM/IEEE Conference on Supercomputing (2005)Google Scholar
  10. 10.
    Cooper, K.D., Harvey, T.J., Waterman, T.: An Adaptive Strategy for Inline Substitution. In: Hendren, L. (ed.) CC 2008. LNCS, vol. 4959, pp. 69–84. Springer, Heidelberg (2008)CrossRefGoogle Scholar
  11. 11.
    Alpern, B., Augart, S., Blackburn, S.M., Butrico, M., Cocchi, A., Cheng, P., Dolby, J., Fink, S., Grove, D., Hind, M., McKinley, K.S., Mergen, M., Moss, J.E.B., Ngo, T., Sarkar, V.: The Jikes research virtual machine project: building an open-source research community. IBM Syst. J. 44(2) (January 2005)Google Scholar
  12. 12.
    Stone, M.: Cross-validatory choice and assessment of statistical predictions. Journal of the Royal Statistical Society B 36(1), 111–147 (1974)zbMATHGoogle Scholar
  13. 13.
    Henning, J.L.: Spec cpu2006 benchmark descriptions. SIGARCH Comput. Archit. News 34(4) (September 2006)Google Scholar
  14. 14.
    Berube, P., Amaral, J.M.: Aestimo: a feedback-directed optimization evaluation tool. In: Proceedings of the IEEE International Symposium on Performance Analysis of Systems and Software (2006)Google Scholar
  15. 15.
    Quinlan, R.J.: Learning with continuous classes. In: 5th Australian Joint Conference on Artificial Intelligence (1992)Google Scholar
  16. 16.
    Jalan, R., Kejariwal, A.: Trin-trin: Who’s calling? a pin-based dynamic call graph extraction framework. International Journal of Parallel Programming 40(4) (2012)Google Scholar
  17. 17.
    Weicker, R.P., Henning, J.L.: Subroutine profiling results for the cpu2006 benchmarks. SIGARCH Comput. Archit. News 35(1) (March 2007)Google Scholar
  18. 18.
    Glek, T., Hubicka, J.: Optimizing real-world applications with gcc link time optimization. In: GCC Developers Summit (2010)Google Scholar
  19. 19.
    Hubicka, J.: Interprocedural optimization framework in GCC. In: GCC Developers Summit (2007)Google Scholar
  20. 20.
    Quinlan, J.R.: C4.5: programs for machine learning. Morgan Kaufmann Publishers Inc., San Francisco (1993)Google Scholar
  21. 21.
    Smola, A.J., Schölkopf, B.: A tutorial on support vector regression. Statistics and Computing 14(3) (August 2004)Google Scholar
  22. 22.
    Siegel, S., Castellan, N.J.: Nonparametric Statistics for the Behavioral Sciences, 2nd edn. McGraw-Hill (1988)Google Scholar
  23. 23.
    Wall, L., Christiansen, T., Orwant, J.: Programming Perl, 3rd edn. O’Reilly Media (2000)Google Scholar
  24. 24.
    Hornik, K., Buchta, C., Zeileis, A.: Open-source machine learning: R meets Weka. Computational Statistics 24(2) (2009)Google Scholar
  25. 25.
    Williams, G.J.: Rattle: A data mining GUI for R. The R Journal 1(2) (December 2009)Google Scholar
  26. 26.
    R Development Core Team. R: A Language and Environment for Statistical Computing. R Foundation for Statistical Computing, Vienna, Austria (2011)Google Scholar
  27. 27.
    Zaparanuks, D., Jovic, M., Hauswirth, M.: Accuracy of performance counter measurements. In: IEEE International Symposium on Performance Analysis of Systems and Software (2009)Google Scholar
  28. 28.
    Levinthal, D.: Performance Analysis Guide for Intel Core i7 Processor and Intel Xeon 5500 processors (2009)Google Scholar
  29. 29.
    Reinders, J.: VTune Performance Analyzer Essentials: Measurement and Tuning Techniques for Software Developers. Engineer to Engineer Series. Intel Press (2005)Google Scholar
  30. 30.
    Rousseeuw, P.J., Leroy, A.M.: Robust regression and outlier detection. John Wiley & Sons, Inc. (1987)Google Scholar
  31. 31.
    Moody, J., Darken, C.J.: Fast learning in networks of locally-tuned processing units. Neural Comput. 1(2) (1989)Google Scholar
  32. 32.
    Student: The Probable Error of a Mean. Biometrika 6(1) (1908)Google Scholar
  33. 33.
    Ayers, A., Schooler, R., Gottlieb, R.: Aggressive inlining. In: Proceedings of the ACM Conference on Programming Language Design and Implementation (1997)Google Scholar
  34. 34.
    Dean, J., Chambers, C.: Towards better inlining decisions using inlining trials. In: Proceedings of the ACM Conference on LISP and Functional Programming (1994)Google Scholar
  35. 35.
    Hazelwood, K., Grove, D.: Adaptive online context-sensitive inlining. In: Proceedings of the International Symposium on Code Generation and Optimization (2003)Google Scholar
  36. 36.
    Cammarota, R., Kejariwal, A., Donato, D., Nicolau, A., Veidenbaum, A.V.: Selective search of inlining vectors for program optimization. In: Proceedings of the 9th Conference on Computing Frontiers (2012)Google Scholar
  37. 37.
    Pan, Z., Eigenmann, R.: Fast and effective orchestration of compiler optimizations for automatic performance tuning. In: Proceedings of the International Symposium on Code Generation and Optimization (2006)Google Scholar
  38. 38.
    Cavazos, J., Fursin, G., Agakov, F., Bonilla, E., O’Boyle, M.F.P., Temam, O.: Rapidly selecting good compiler optimizations using performance counters. In: Proceedings of the International Symposium on Code Generation and Optimization (2007)Google Scholar
  39. 39.
    Fursin, G., Temam, O.: Collective optimization: A practical collaborative approach. ACM Trans. Archit. Code Optim. 7(4) (December 2010)Google Scholar
  40. 40.
    Monsifrot, A., Bodin, F., Quiniou, R.: A Machine Learning Approach to Automatic Production of Compiler Heuristics. In: Scott, D. (ed.) AIMSA 2002. LNCS (LNAI), vol. 2443, pp. 41–50. Springer, Heidelberg (2002)CrossRefGoogle Scholar
  41. 41.
    Stephenson, M., Amarasinghe, S., Martin, M., O’Reilly, U.: Meta optimization: improving compiler heuristics with machine learning. In: Proceedings of the ACM SIGPLAN Conference on Programming Language Design and Implementation (2003)Google Scholar
  42. 42.
    Pan, Z., Eigenmann, R.: Rating compiler optimizations for automatic performance tuning. In: Proceedings of the ACM/IEEE Conference on Supercomputing (2004)Google Scholar
  43. 43.
    Haneda, M., Knijnenburg, P.M.W., Wijshoff, H.A.G.: Optimizing general purpose compiler optimization. In: Proceedings of the 2nd Conference on Computing Frontiers (2005)Google Scholar
  44. 44.
    Stephenson, M., Amarasinghe, S.: Predicting unroll factors using supervised classification. In: Proceedings of the International Symposium on Code Generation and Optimization (2005)Google Scholar
  45. 45.
    Haneda, M., Knijnenburg, P.M.W., Wijshoff, H.A.G.: On the impact of data input sets on statistical compiler tuning. In: Proceedings of the 20th International Conference on Parallel and Distributed Processing (2006)Google Scholar
  46. 46.
    Dubach, C., Jones, T.M., Bonilla, E.V., Fursin, G., O’Boyle, M.F.P.: Portable compiler optimisation across embedded programs and microarchitectures using machine learning. In: Proceedings of the IEEE/ACM International Symposium on Microarchitecture (2009)Google Scholar
  47. 47.
    Pearson, K.: On the criterion that a given system of deviations from the probable in the case of a correlated system of variables is such that it can be reasonably supposed to have arised from random sampling. Philosophical Magazine Series 5 50 (1900)Google Scholar
  48. 48.
    Pearson, K.: Notes on the History of Correlation. Biometrika 13(1) (October 1920)Google Scholar
  49. 49.
    Rodgers, J.L., Nicewander, A.W.: Thirteen ways to look at the correlation coefficient. The American Statistician 42 (1988)Google Scholar

Copyright information

© Springer-Verlag Berlin Heidelberg 2013

Authors and Affiliations

  • Rosario Cammarota
    • 1
  • Alexandru Nicolau
    • 1
  • Alexander V. Veidenbaum
    • 1
  • Arun Kejariwal
    • 2
  • Debora Donato
    • 2
  • Mukund Madhugiri
    • 2
  1. 1.University of California IrvineUSA
  2. 2.Yahoo! Inc.USA

Personalised recommendations