Learning basic block scheduling heuristics from optimal data

Instruction scheduling is an important step for improving the performance of object code produced by a compiler. The basic block instruction scheduling problem 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 criticalpath 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]  Karl Rihaczek,et al.  1. WHAT IS DATA MINING? , 2019, Data Mining for the Social Sciences.

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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