|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Object scale.backend.BBIS
public class BBIS
This class provides basic block instruction scheduling.
$Id: BBIS.java,v 1.15 2007-10-04 19:57:48 burrill Exp $
Copyright 2008 by the
Scale Compiler Group,
Department of Computer Science
University of Massachusetts,
Amherst MA. 01003, USA
All Rights Reserved.
The basic organization for this instruction scheduler was inspired by Chapter 12 of "Engineering a Compiler" by Keith D. Cooper and Linda Torczon, Morgan Kaufman Publishers, ISBN: 1-55860-698-X.
The basic list scheduling algorithm is used. Both forward and backward list scheduling are tried for each basic block to obtain the best schedule. The scheduler picks the priority scheme used to select the next instruction based on metrics of the basic block.
Anit-dependencies are handled without renaming. When the scheduler is run prior to rgister allocation very little renaming is required. When run after register allocation, renaming cannot be used.
The schuler requires two pieces on information from each instruction in addition to the registers used or def-ed by the instruction.
To add a different instruction scheduler, derive it from this class
and implement the schedule()
method. Then
modify the code generator
to use the new
instruction scheduler.
Field Summary | |
---|---|
static boolean |
all
True if all functions should be scheduled - false if just traced functions should be scheduled. |
static boolean |
classTrace
True if traces are to be performed. |
protected Generator |
gen
|
static int |
max
Maximum block size to be scheduled. |
static int |
min
Minimum block size to be scheduled. |
protected RegisterSet |
registers
|
Constructor Summary | |
---|---|
BBIS(Generator gen)
|
Method Summary | |
---|---|
Instruction |
schedule(Instruction insts,
boolean trace)
Schedule all the instructions in a function. |
Methods inherited from class java.lang.Object |
---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Field Detail |
---|
public static boolean classTrace
public static boolean all
public static int min
public static int max
protected Generator gen
protected RegisterSet registers
Constructor Detail |
---|
public BBIS(Generator gen)
Method Detail |
---|
public Instruction schedule(Instruction insts, boolean trace)
insts
- is the list of instructions
|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |