language: en

Learning to Schedule Straight-Line Code

J. Eliot B. Moss
Dept. of Comp. Sci. Univ. of Mass.
Amherst, MA 01003
Paul E. Utgoff
Dept. of Comp. Sci. Univ. of Mass.
Amherst, MA 01003
John Cavazos
Dept. of Comp. Sci. Univ. of Mass.
Amherst, MA 01003
Doina Precup
Dept. of Comp. Sci. Univ. of Mass.
Amherst, MA 01003
Darko Stefanovi c
Dept. of Comp. Sci. Univ. of Mass.
Amherst, MA 01003
Carla Brodley
Sch. of Elec. and Comp. Eng. Purdue University
W. Lafayette, IN 47907
David Scheeff
Sch. of Elec. and Comp. Eng. Purdue University
W. Lafayette, IN 47907

Abstract Execution speed of programs on modern computer architectures is sensitive, by a factor of two or more, to the order in which instructions are presented to the processor. To realize potential execution efficiency, it is now customary for an optimizing compiler to employ a heuristic algorithm for instruction scheduling. These algorithms are painstakingly hand-crafted, which is expenseive and time-consuming. We show how to cast the instruction scheduling problem as a learning task, so that one obtains the heuristic scheduling algorithm automatically. Our focus is the narrower problem of scheduling straight-line code, also known as a basic block of instructions. Our empirical results show that just a few features are adequate for quite good performance at this task for a real modern processor, and that any of several supervised learning methods perform nearly optimally with respect to the features used.

Category: Applications (compiler optimization)

[Original: This work has not been submitted elsewhere.]

[Presentation: We prefer oral presentation. Contact author: Eliot Moss]

1 Introduction