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

skip to main content
10.1109/CGO.2013.6495004acmconferencesArticle/Chapter ViewAbstractPublication PagesConference Proceedingsacm-pubtype
Article

Automatic construction of inlining heuristics using machine learning

Published: 23 February 2013 Publication History

Abstract

Method inlining is considered to be one of the most important optimizations in a compiler. However, a poor inlining heuristic can lead to significant degradation of a program's running time. Therefore, it is important that an inliner has an effective heuristic that controls whether a method is inlined or not. An important component of any inlining heuristic are the features that characterize the inlining decision. These features often correspond to the caller method and the callee methods. However, it is not always apparent what the most important features are for this problem or the relative importance of these features. Compiler writers developing inlining heuristics may exclude critical information that can be obtained during each inlining decision. In this paper, we use a machine learning technique, namely neuro-evolution [18], to automatically induce effective inlining heuristics from a set of features deemed to be useful for inlining. Our learning technique is able to induce novel heuristics that significantly out-perform manually-constructed inlining heuristics. We evaluate the heuristic constructed by our neuro-evolutionary technique within the highly tuned Java HotSpot server compiler and the Maxine VM C1X compiler, and we are able to obtain speedups of up to 89% and 114%, respectively. In addition, we obtain an average speedup of almost 9% and 11% for the Java HotSpot VM and Maxine VM, respectively. However, the output of neuro-evolution, a neural network, is not human readable. We show how to construct more concise and read-able heuristics in the form of decision trees that perform as well as our neuro-evolutionary approach.

References

[1]
M. Arnold, S. Fink, V. Sarkar, and P. F. Sweeney. A comparative study of static and profile-based heuristics for inlining. In 2000 ACM SIGPLAN Workshop on Dynamic and Adaptive Compilation and Optimization (DYNAMO '00), Boston, MA, Jan. 2000.
[2]
S. M. Blackburn, R. Garner, C. Hoffman, A. M. Khan, K. S. McKinley, R. Bentzur, A. Diwan, D. Feinberg, D. Frampton, S. Z. Guyer, M. Hirzel, A. Hosking, M. Jump, H. Lee, J. E. B. Moss, A. Phansalkar, D. Stefanovic, T. VanDrunen, D. von Dincklage, and B. Wiedermann. The DaCapo benchmarks: Java benchmarking development and analysis. In OOPSLA '06: Proceedings of the 21st annual ACM SIGPLAN conference on Object-Oriented Programing, Systems, Languages, and Applications, pages 169-190, New York, NY, USA, Oct. 2006. ACM Press.
[3]
J. M. Bull, L. A. Smith, M. D. Westhead, D. S. Henty, and R. A. Davey. A benchmark suite for high performance java. Concurrency - Practice and Experience, 12(6):375-388, 2000.
[4]
J. Cavazos and J. E. B. Moss. Inducing heuristics to decide whether to schedule. In Proceedings of the ACM SIGPLAN '04 Conference on Programming Language Design and Implementation, pages 183-194, Washington, D.C., June 2004. ACM Press.
[5]
J. Cavazos and M. F. P. O'Boyle. Automatic tuning of inlining heuristics. In IN ACM/IEEE CONFERENCE ON SUPERCOMPUTING, page 14. IEEE Computer Society, 2005.
[6]
K. Cooper, T. Harvey, and T. Waterman. An adaptive strategy for inline substitution. In L. Hendren, editor, Compiler Construction, volume 4959 of Lecture Notes in Computer Science, pages 69-84. Springer Berlin /Heidelberg, 2008. 10.1007/978-3-540-78791-4 5.
[7]
K. D. Cooper, P. J. Schielke, and D. Subramanian. Optimizing for reduced code space using genetic algorithms. In Proceedings of the ACM SIGPLAN 1999 workshop on Languages, compilers, and tools for embedded systems, pages 1-9, Atlanta, Georgia, July 1999. ACM, ACM Press.
[8]
J. Dean and C. Chambers. Towards better inlining decisions using inlining trials. In LISP and Functional Programming, pages 273-282, 1994.
[9]
M. Hall, E. Frank, G. Holmes, B. Pfahringer, P. Reutemann, and I. H. Witten. The weka data mining software: an update. SIGKDD Explor. Newsl., 11:10-18, November 2009.
[10]
K. Hazelwood and D. Grove. Adaptive online context-sensitive inlining. In First Annual IEEE/ACM Interational Conference on Code Generation and Optimization, pages 253-264, San Francisco, CA, March 2003.
[11]
R. Leupers and P. Marwedel. Function inlining under code size constraints for embedded processors. In ICCAD '99: Proceedings of the 1999 IEEE/ACM international conference on Computer-aided design, pages 253-256, Piscataway, NJ, USA, 1999. IEEE Press.
[12]
S. Luke. ECJ 11: A Java evolutionary computation library. http://cs.gmu.edu/~eclab/projects/ecj/, 2004.
[13]
A. Monsifrot and F. Bodin. A machine learning approach to automatic production of compiler heuristics. In Tenth International Conference on Artificial Intelligence: Methodology, Systems, Applications (AIMSA), pages 41-50, Varna, Bulgaria, September 2002. Springer Verlag.
[14]
M. Paleczny, C. Vick, and C. Click. The Java HotSpot¿ server compiler. In Proceedings of the Symposium on Java Virtual Machine Research and Technology, pages 1-12. USENIX, 2001.
[15]
A. Sewe, M. Mezini, A. Sarimbekov, and W. Binder. Da capo con scala: design and analysis of a scala benchmark suite for the java virtual machine. In Proceedings of the 2011 ACM international conference on Object oriented programming systems languages and applications, OOPSLA '11, pages 657-676, New York, NY, USA, 2011. ACM.
[16]
Standard Performance Evaluation Corporation (SPEC), Fairfax, VA. SPEC JVM98 Benchmarks, 1998.
[17]
Standard Performance Evaluation Corporation (SPEC), Fairfax, VA. SPEC JVM2008 Benchmarks, 2008.
[18]
K. Stanley and R. Miikkulainen. Evolving neural networks through augmenting topologies. Evolutionary computation, 10(2):99-127, 2002.
[19]
M. Stephenson, S. Amarasinghe, M. Martin, and U.-M. O'Reilly. Meta optimization: Improving compiler heuristics with machine learning. In Proceedings of the ACM SIGPLAN '03 Conference on Programming Language Design and Implementation, pages 77-90, San Diego, Ca, June 2003. ACM Press.
[20]
C. Wimmer, M. Haupt, M. L. Van De Vanter, M. Jordan, L. Daynes, and D. Simon. Maxine: An approachable virtual machine for, and in, Java. ACM Transactions on Architecture and Code Optimization, 2013.

Cited By

View all
  • (2024)The Droplet Search Algorithm for Kernel SchedulingACM Transactions on Architecture and Code Optimization10.1145/365010921:2(1-28)Online publication date: 21-May-2024
  • (2024)The Next 700 ML-Enabled Compiler OptimizationsProceedings of the 33rd ACM SIGPLAN International Conference on Compiler Construction10.1145/3640537.3641580(238-249)Online publication date: 17-Feb-2024
  • (2024)Revealing Compiler Heuristics through Automated Discovery and OptimizationProceedings of the 2024 IEEE/ACM International Symposium on Code Generation and Optimization10.1109/CGO57630.2024.10444847(55-66)Online publication date: 2-Mar-2024
  • Show More Cited By

Recommendations

Comments

Please enable JavaScript to view thecomments powered by Disqus.

Information & Contributors

Information

Published In

cover image ACM Conferences
CGO '13: Proceedings of the 2013 IEEE/ACM International Symposium on Code Generation and Optimization (CGO)
February 2013
366 pages
ISBN:9781467355247

Sponsors

Publisher

IEEE Computer Society

United States

Publication History

Published: 23 February 2013

Check for updates

Qualifiers

  • Article

Contributors

Other Metrics

Bibliometrics & Citations

Bibliometrics

Article Metrics

  • Downloads (Last 12 months)13
  • Downloads (Last 6 weeks)0
Reflects downloads up to 21 Nov 2024

Other Metrics

Citations

Cited By

View all
  • (2024)The Droplet Search Algorithm for Kernel SchedulingACM Transactions on Architecture and Code Optimization10.1145/365010921:2(1-28)Online publication date: 21-May-2024
  • (2024)The Next 700 ML-Enabled Compiler OptimizationsProceedings of the 33rd ACM SIGPLAN International Conference on Compiler Construction10.1145/3640537.3641580(238-249)Online publication date: 17-Feb-2024
  • (2024)Revealing Compiler Heuristics through Automated Discovery and OptimizationProceedings of the 2024 IEEE/ACM International Symposium on Code Generation and Optimization10.1109/CGO57630.2024.10444847(55-66)Online publication date: 2-Mar-2024
  • (2024)Enhancing Performance through Control-Flow Unmerging and Loop Unrolling on GPUsProceedings of the 2024 IEEE/ACM International Symposium on Code Generation and Optimization10.1109/CGO57630.2024.10444819(106-118)Online publication date: 2-Mar-2024
  • (2023)Performance Optimization using Multimodal Modeling and Heterogeneous GNNProceedings of the 32nd International Symposium on High-Performance Parallel and Distributed Computing10.1145/3588195.3592984(45-57)Online publication date: 7-Aug-2023
  • (2023)RL4ReAl: Reinforcement Learning for Register AllocationProceedings of the 32nd ACM SIGPLAN International Conference on Compiler Construction10.1145/3578360.3580273(133-144)Online publication date: 17-Feb-2023
  • (2022)Improving Vectorization Heuristics in a Dynamic Compiler with Machine Learning ModelsProceedings of the 14th ACM SIGPLAN International Workshop on Virtual Machines and Intermediate Languages10.1145/3563838.3567679(36-47)Online publication date: 29-Nov-2022
  • (2022)Geração Automática de Benchmarks para Compilação PreditivaProceedings of the XXVI Brazilian Symposium on Programming Languages10.1145/3561320.3561323(59-67)Online publication date: 6-Oct-2022
  • (2022)Investigating magic numbers: improving the inlining heuristic in the Glasgow Haskell CompilerProceedings of the 15th ACM SIGPLAN International Haskell Symposium10.1145/3546189.3549918(81-94)Online publication date: 6-Sep-2022
  • (2022)Understanding and exploiting optimal function inliningProceedings of the 27th ACM International Conference on Architectural Support for Programming Languages and Operating Systems10.1145/3503222.3507744(977-989)Online publication date: 28-Feb-2022
  • Show More Cited By

View Options

Login options

View options

PDF

View or Download as a PDF file.

PDF

eReader

View online with eReader.

eReader

Media

Figures

Other

Tables

Share

Share

Share this Publication link

Share on social media