Location via proxy:   [ UP ]  
[Report a bug]   [Manage cookies]                
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
  • (2018)A Survey on Compiler Autotuning using Machine LearningACM Computing Surveys10.1145/319797851:5(1-42)Online publication date: 18-Sep-2018
  • (2018)An efficient tile size selection model based on machine learningJournal of Parallel and Distributed Computing10.1016/j.jpdc.2018.06.005121(27-41)Online publication date: Nov-2018
  • (2017)MiCOMPACM Transactions on Architecture and Code Optimization10.1145/312445214:3(1-28)Online publication date: 6-Sep-2017
  • Show More Cited By

Recommendations

Comments

Information & Contributors

Information

Published In

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
  • 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
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]

Publisher

Association for Computing Machinery

New York, NY, United States

Publication History

Published: 09 June 2004
Published in SIGPLAN Volume 39, Issue 6

Check for updates

Author Tags

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

Qualifiers

  • Article

Contributors

Other Metrics

Bibliometrics & Citations

Bibliometrics

Article Metrics

  • Downloads (Last 12 months)11
  • Downloads (Last 6 weeks)2
Reflects downloads up to 03 Sep 2024

Other Metrics

Citations

Cited By

View all
  • (2018)A Survey on Compiler Autotuning using Machine LearningACM Computing Surveys10.1145/319797851:5(1-42)Online publication date: 18-Sep-2018
  • (2018)An efficient tile size selection model based on machine learningJournal of Parallel and Distributed Computing10.1016/j.jpdc.2018.06.005121(27-41)Online publication date: Nov-2018
  • (2017)MiCOMPACM Transactions on Architecture and Code Optimization10.1145/312445214:3(1-28)Online publication date: 6-Sep-2017
  • (2017)BackgroundAutomatic Tuning of Compilers Using Machine Learning10.1007/978-3-319-71489-9_1(1-22)Online publication date: 23-Dec-2017
  • (2013)ÆminiumGPU: An Intelligent Framework for GPU ProgrammingFacing the Multicore-Challenge III10.1007/978-3-642-35893-7_9(96-107)Online publication date: 2013
  • (2011)Machine Learning Techniques in Compiler DesignWorst-Case Execution Time Aware Compilation Techniques for Real-Time Systems10.1007/978-90-481-9929-7_6(159-195)Online publication date: 2011
  • (2011)WCET-Aware Assembly Level OptimizationsWorst-Case Execution Time Aware Compilation Techniques for Real-Time Systems10.1007/978-90-481-9929-7_5(131-157)Online publication date: 2011
  • (2010)ReferencesReal Life Applications of Soft Computing10.1201/EBK1439822876-b1(597-639)Online publication date: 12-Jul-2010
  • (2010)Offline library adaptation using automatically generated heuristics2010 IEEE International Symposium on Parallel & Distributed Processing (IPDPS)10.1109/IPDPS.2010.5470479(1-10)Online publication date: Apr-2010
  • (2010)Spatial Based Feature Generation for Machine Learning Based Optimization CompilationProceedings of the 2010 Ninth International Conference on Machine Learning and Applications10.1109/ICMLA.2010.147(925-930)Online publication date: 12-Dec-2010
  • 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