skip to main content
Article

Inducing heuristics to decide whether to schedule

Published: 09 June 2004 Publication History

Abstract

Instruction scheduling is a compiler optimization that can improve program speed, sometimes by 10% or more, but it can also be expensive. Furthermore, time spent optimizing is more important in a Java just-in-time (JIT) compiler than in a traditional one because a JIT compiles code at run time, adding to the running time of the program. We found that, on any given block of code, instruction scheduling often does not produce significant benefit and sometimes degrades speed. Thus, we hoped that we could focus scheduling effort on those blocks that benefit from it.Using supervised learning we induced heuristics to predict which blocks benefit from scheduling. The induced function chooses, for each block, between list scheduling and not scheduling the block at all. Using the induced function we obtained over 90% of the improvement of scheduling every block but with less than 25% of the scheduling effort. When used in combination with profile-based adaptive optimization, the induced function remains effective but gives a smaller reduction in scheduling effort. Deciding when to optimize, and which optimization(s) to apply, is an important open problem area in compiler research. We show that supervised learning solves one of these problems well.

References

[1]
B. Alpern, C. R. Attanasio, J. J. Barton, M. G. Burke, P.Cheng, J.-D. Choi, A. Cocchi, S. J. Fink, D. Grove, M. Hind, S. F. Hummel, D. Lieber, V. Litvinov, M. F. Mergen, T. Ngo, J. R. Russell, V. Sarkar, M. J. Serrano, J. C. Shepherd, S. E. Smith, V. C. Sreedhar, H. Srinivasan, and J. Whaley. The Jalapeño virtual machine. IBM Systems Journal, 39(1), Feb. 2000.
[2]
M. Arnold, S. Fink, D. Grove, M. Hind, and P. F. Sweeney. Adaptive optimization in the Jalape no JVM. In ACM SIGPLAN Conference on Object-Oriented Programming Systems, Languages, and Applications (OOPSLA 2000), Minneapolis, MN, Oct. 2000.
[3]
M. Arnold and B. G. Ryder. A framework for reducing the cost of instrumented code. In SIGPLAN Conference on Programming Language Design and Implementation, pages 168--179, 2001.
[4]
B. Calder, D. Grunwald, M. Jones, D. Lindsay, J. Martin, M. Mozer, and B. Zoren. Evidence-based static branch prediction using machine learning. ACM Transactions on Programming Languages and Systems, 19(1):188--222, January 1997.
[5]
C. Chekuri, R. Johnson, R. Motwani, B. Natarajan, B. Rau, and M.Schlansker. Profile-driven instruction level parallel scheduling with application to super blocks. In Proceedings of the 29th International Symposium on Microarchitecture, pages 58--67, 1992.
[6]
W. W. Cohen. Fast effective rule induction. In Proceedings of the Twelfth International Conference on Machine Learning, Lake Tahoe, CA, Nov. 1995.
[7]
K. D. Cooper, P. J. Schielke, and D. Subramanian. Optimizing for reduced code space using genetic algorithms. In Workshop on Languages, Compilers, and Tools for Embedded Systems, pages 1--9, 1999.
[8]
J. R. Ellis. Bulldog: A Compiler for VLIW Architectures. PhD thesis, Yale, Feb. 1985.
[9]
J. A. Fisher. Trace scheduling: a technique for global microcode compaction. IEEE Transactions on Computers, 30:478--490, July 1981.
[10]
M. R. Garey and D. S. Johnson. Computers and Intractability: A Guide to the Theory of NP-Completeness. W.H. Freeman and Co., San Francisco, CA, 1979.
[11]
P. B. Gibbons and S. S. Muchnick. Efficient instruction scheduling for a pipelined architecture. In Proceedings ACM SIGPLAN '86 Conference on Programming Language Design and Implementation, pages 11--16, 1986.
[12]
A. McGovern, E. Moss, and A. G. Barto. Building a basic block instruction scheduler with reinforcement learning and rollouts. Machine Learning, 49(2/3):141--160, 2002.
[13]
A. McGovern and J. E. B. Moss. Scheduling straight-line code using reinforcement learning and rollouts. In S. Solla, editor, Advances in Neural Information Processing Systems 11, Cambridge, MA, 1998. MIT Press.
[14]
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, September 2002.
[15]
J. E. B. Moss, P. E. Utgoff, J. Cavazos, D. Precup, D. Stefanović, C. Brodley, and D. Scheeff. Learning to schedule straight-line code. In Proceedings of Neural Information Processing Systems 1997 (NIPS*97), Denver CO, Dec. 1997.
[16]
S. S. Muchnick. Advanced Compiler Design & Implementation. Morgan Kaufmann Publishers, Inc., San Francisco, CA, 1997.
[17]
Standard Performance Evaluation Corporation (SPEC), Fairfax, VA. SPEC JVM98 Benchmarks, 1998.
[18]
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, San Diego, Ca, June 2003. Association of Computing Machinery.
[19]
C. Young and M. Smith. Better global scheduling using path profiles. In Proceedings of the 28th International Symposium on Microarchitecture, pages 199--206, Nov. 1995.

Cited By

View all
  • (2020)Referee: A Pattern-Guided Approach for Auto Design in Compiler-Based Analyzers2020 IEEE 27th International Conference on Software Analysis, Evolution and Reengineering (SANER)10.1109/SANER48275.2020.9054849(1-12)Online publication date: Feb-2020
  • (2019)Multi-objective Exploration for Practical Optimization Decisions in Binary TranslationACM Transactions on Embedded Computing Systems10.1145/335818518:5s(1-19)Online publication date: 7-Oct-2019
  • (2019)Using meta-heuristics and machine learning for software optimization of parallel computing systemsComputing10.1007/s00607-018-0614-9101:8(893-936)Online publication date: 1-Aug-2019
  • Show More Cited By

Recommendations

Comments

Information & Contributors

Information

Published In

cover image ACM Conferences
PLDI '04: Proceedings of the ACM SIGPLAN 2004 conference on Programming language design and implementation
June 2004
310 pages
ISBN:1581138075
DOI:10.1145/996841
  • cover image ACM SIGPLAN Notices
    ACM SIGPLAN Notices  Volume 39, Issue 6
    PLDI '04
    May 2004
    299 pages
    ISSN:0362-1340
    EISSN:1558-1160
    DOI:10.1145/996893
    Issue’s Table of Contents
Permission to make digital or hard copies of all or part of this work for personal or classroom use is granted without fee provided that copies are not made or distributed for profit or commercial advantage and that copies bear this notice and the full citation on the first page. Copyrights for components of this work owned by others than ACM must be honored. Abstracting with credit is permitted. To copy otherwise, or republish, to post on servers or to redistribute to lists, requires prior specific permission and/or a fee. Request permissions from [email protected]

Sponsors

Publisher

Association for Computing Machinery

New York, NY, United States

Publication History

Published: 09 June 2004

Permissions

Request permissions for this article.

Check for updates

Author Tags

  1. Java
  2. Jikes RVM
  3. compiler optimization
  4. instruction scheduling
  5. machine learning
  6. supervised learning

Qualifiers

  • Article

Conference

PLDI04
Sponsor:

Acceptance Rates

Overall Acceptance Rate 406 of 2,067 submissions, 20%

Contributors

Other Metrics

Bibliometrics & Citations

Bibliometrics

Article Metrics

  • Downloads (Last 12 months)12
  • Downloads (Last 6 weeks)2
Reflects downloads up to 22 Oct 2024

Other Metrics

Citations

Cited By

View all
  • (2020)Referee: A Pattern-Guided Approach for Auto Design in Compiler-Based Analyzers2020 IEEE 27th International Conference on Software Analysis, Evolution and Reengineering (SANER)10.1109/SANER48275.2020.9054849(1-12)Online publication date: Feb-2020
  • (2019)Multi-objective Exploration for Practical Optimization Decisions in Binary TranslationACM Transactions on Embedded Computing Systems10.1145/335818518:5s(1-19)Online publication date: 7-Oct-2019
  • (2019)Using meta-heuristics and machine learning for software optimization of parallel computing systemsComputing10.1007/s00607-018-0614-9101:8(893-936)Online publication date: 1-Aug-2019
  • (2018)Support Vector Machine for Frequently Executed Method Prediction2018 International Conference on Information Technology (ICIT)10.1109/ICIT.2018.00048(193-198)Online publication date: Dec-2018
  • (2017)An application of composite nano-patterns to compiler selected profiling techniquesProceedings of the 6th International Conference on Software and Computer Applications10.1145/3056662.3056679(186-190)Online publication date: 26-Feb-2017
  • (2016)Tuning compilations landscape2016 2nd International Conference on Contemporary Computing and Informatics (IC3I)10.1109/IC3I.2016.7918029(575-583)Online publication date: Dec-2016
  • (2015)A Genetic Programming Approach to Design Resource Allocation Policies for Heterogeneous Workflows in the CloudProceedings of the 2015 IEEE 21st International Conference on Parallel and Distributed Systems (ICPADS)10.1109/ICPADS.2015.54(372-379)Online publication date: 14-Dec-2015
  • (2014)Automatic feature generation for machine learning--based optimising compilationACM Transactions on Architecture and Code Optimization10.1145/253668811:1(1-32)Online publication date: 1-Feb-2014
  • (2014)Performance Metrics and Models for Shared CacheJournal of Computer Science and Technology10.1007/s11390-014-1460-729:4(692-712)Online publication date: 4-Jul-2014
  • (2013)Automatic construction of inlining heuristics using machine learningProceedings of the 2013 IEEE/ACM International Symposium on Code Generation and Optimization (CGO)10.1109/CGO.2013.6495004(1-12)Online publication date: 23-Feb-2013
  • Show More Cited By

View Options

Get Access

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