Instruction scheduling algorithms are used in compilers to reduce run-time delays for the compiled code by the reordering or transformation of program statements, usually at the intermediate language or assembly code level. Considerable research has been carried out on scheduling code within the scope of basic blocks, i.e., straight line sections of code, and very effective basic block schedulers are now included in most modern compilers and especially for pipeline processors. In previous work Golumbic and Rainis: IBM J. Res. Dev., Vol. 34, pp.93-97, 1990, we presented code replication techniques for scheduling beyond the scope of basic blocks that provide reasonable improvements of running time of the compiled code, but which still leaves room for further improvement. In this article we present a new method for scheduling beyond basic blocks called SHACOOF. This new technique takes advantage of a conventional, high quality basic block scheduler by first suppressing selected subsequences of instructions and then scheduling the modified sequence of instructions using the basic block scheduler. A candidate subsequence for suppression can be found by identifying a region of a program control flow graph, called an S-region, which has a unique entry and a unique exit and meets predetermined criteria. This enables scheduling of a sequence of instructions beyond basic block boundaries, with only minimal changes to an existing compiler, by identifying beneficial opportunities to cover delays that would otherwise have been beyond its scope.
[1]
John Cocke,et al.
A methodology for the real world
,
1981
.
[2]
Ron Y. Pinter,et al.
Optimal chaining in expression trees
,
1986,
SIGPLAN '86.
[3]
Ron Y. Pinter,et al.
Spill code minimization techniques for optimizing compliers
,
1989,
PLDI '89.
[4]
Ron Y. Pinter,et al.
Optimal Chaining in Expression Trees
,
1988,
IEEE Trans. Computers.
[5]
Henry S. Warren,et al.
Instruction Scheduling for the IBM RISC System/6000 Processor
,
1990,
IBM J. Res. Dev..
[6]
Thomas R. Gross,et al.
Postpass Code Optimization of Pipeline Constraints
,
1983,
TOPL.
[7]
Gregory J. Chaitin,et al.
Register allocation & spilling via graph coloring
,
1982,
SIGPLAN '82.
[8]
Joe D. Warren,et al.
The program dependence graph and its use in optimization
,
1987,
TOPL.
[9]
Martin Charles Golumbic,et al.
Instruction Scheduling Beyond Basic Blocks
,
1990,
IBM J. Res. Dev..
[10]
Martin Hopkins,et al.
An overview of the PL.8 compiler
,
1982,
SIGPLAN '82.
[11]
Alfred V. Aho,et al.
Compilers: Principles, Techniques, and Tools
,
1986,
Addison-Wesley series in computer science / World student series edition.