Learning heuristics for basic block instruction scheduling

Abstract Instruction scheduling is an important step for improving the performance of object code produced by a compiler. A fundamental problem that arises in instruction scheduling is to find a minimum length schedule for a basic block—a straight-line sequence of code with a single entry point and a single exit point—subject to precedence, latency, and resource constraints. Solving the problem exactly is known to be difficult, and most compilers use a greedy list scheduling algorithm coupled with a heuristic. The heuristic is usually hand-crafted, a potentially time-consuming process. In contrast, we present a study on automatically learning good heuristics using techniques from machine learning. In our study, a recently proposed optimal basic block scheduler was used to generate the machine learning training data. A decision tree learning algorithm was then used to induce a simple heuristic from the training data. The automatically constructed decision tree heuristic was compared against a popular critical-path heuristic on the SPEC 2000 benchmarks. On this benchmark suite, the decision tree heuristic reduced the number of basic blocks that were not optimally scheduled by up to 55% compared to the critical-path heuristic, and gave improved performance guarantees in terms of the worst-case factor from optimality.

[1]  Carla E. Brodley,et al.  Learning to Schedule Straight-Line Code , 1997, NIPS.

[2]  Steven S. Muchnick,et al.  Advanced Compiler Design and Implementation , 1997 .

[3]  Peter van Beek,et al.  Fast Optimal Instruction Scheduling for Single-Issue Processors with Arbitrary Latencies , 2001, CP.

[4]  Christos A. Papachristou,et al.  On reordering instruction streams for pipelined computers , 1989, MICRO 22.

[5]  Miodrag Potkonjak,et al.  MediaBench: a tool for evaluating and synthesizing multimedia and communications systems , 1997, Proceedings of 30th Annual International Symposium on Microarchitecture.

[6]  Henry S. Warren,et al.  Instruction Scheduling for the IBM RISC System/6000 Processor , 1990, IBM J. Res. Dev..

[7]  J. Ross Quinlan,et al.  C4.5: Programs for Machine Learning , 1992 .

[8]  Michael Pinedo,et al.  Scheduling: Theory, Algorithms, and Systems , 1994 .

[9]  Ulrich Dorndorf,et al.  Project Scheduling with Time Windows , 2002 .

[10]  Mark Smotherman,et al.  Efficient DAG construction and heuristic calculation for instruction scheduling , 1991, MICRO 24.

[11]  天野 英晴 J. L. Hennessy and D. A. Patterson: Computer Architecture: A Quantitative Approach, Morgan Kaufmann (1990)(20世紀の名著名論) , 2003 .

[12]  Professor Dr. Klaus Neumann,et al.  Project Scheduling with Time Windows and Scarce Resources , 2003, Springer Berlin Heidelberg.

[13]  David A. Patterson,et al.  Computer Architecture: A Quantitative Approach , 1969 .

[14]  G. G. Stokes "J." , 1890, The New Yale Book of Quotations.

[15]  Ghassan Shobaki,et al.  Optimal Superblock Scheduling Using Enumeration , 2004, 37th International Symposium on Microarchitecture (MICRO-37'04).

[16]  Peter van Beek,et al.  Optimal Basic Block Instruction Scheduling for Multiple-Issue Processors Using Constraing Programming , 2006, ICTAI.

[17]  Peter van Beek,et al.  Optimal Basic Block Instruction Scheduling for Multiple-Issue Processors Using Constraint Programming , 2008, Int. J. Artif. Intell. Tools.

[18]  R. Govindarajan Instruction Scheduling , 2002, The Compiler Design Handbook, 2nd ed..

[19]  Xiaonan Li,et al.  Discovering Dispatching Rules Using Data Mining , 2005, J. Sched..

[20]  Andrew G. Barto,et al.  Basic-block Instruction Scheduling Using Reinforcement Learning and Rollouts , 2002 .

[21]  Bob Blainey,et al.  Instruction scheduling in the TOBEY compiler , 1994, IBM J. Res. Dev..

[22]  Keith D. Cooper,et al.  Engineering a Compiler , 2003 .

[23]  Isabelle Guyon,et al.  An Introduction to Variable and Feature Selection , 2003, J. Mach. Learn. Res..

[24]  Karl Rihaczek,et al.  1. WHAT IS DATA MINING? , 2019, Data Mining for the Social Sciences.

[25]  Aiko M. Hormann,et al.  Programs for Machine Learning. Part I , 1962, Inf. Control..