|
|||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||||
java.lang.Objectorg.jikesrvm.compilers.opt.instrsched.Scheduler
final class Scheduler
Instruction Scheduler It is a simple list scheduler This class is declared as "final" which implies that all its methods are "final" too. TODO: - Add more priority lists - When scheduling an instruction, verify that its predecessors have already been scheduled. - Change forward propagation of earliest time to computing it from the scheduling time of predecessors + latencies. - Change bubble sort to insertion sort.
| Nested Class Summary | |
|---|---|
private static class |
Scheduler.InstructionBucket
A class representing sorted list of instructions. |
| Field Summary | |
|---|---|
private BasicBlock |
bb
Current basic block. |
private DepGraph |
dg
Dependence graph for current basic block. |
private DepGraphNode[] |
i2gn
Mapping from Instruction to DepGraphNode. |
private IR |
ir
Current IR. |
private int |
phase
Current phase (prepass/postpass). |
static String[] |
PhaseName
Names of various scheduling phases. |
static int |
POSTPASS
A constant signifying post-pass scheduling phase. |
static int |
PREPASS
A constant signifying pre-pass scheduling phase. |
private static boolean |
PRINT_CRITICAL_PATH_LENGTH
Should we print the length of the critical path for each basic block? |
private static int |
VERBOSE
Debugging level. |
| Constructor Summary | |
|---|---|
Scheduler(int phase)
Initialize scheduler for a given phase. |
|
| Method Summary | |
|---|---|
private void |
computeCriticalPath(DepGraphNode n,
int depth)
Perform DFS to compute critical path for all instructions. |
private int |
computeEarliestTime(Instruction i)
Compute earliest scheduling time for an instruction. |
private static void |
debug(int depth,
String s)
Output debugging information with indentation. |
private static void |
debug(String s)
Output debugging information. |
private DepGraphNode |
getGraphNode(Instruction i)
Return corresponding graph node for instruction. |
(package private) void |
perform(IR _ir)
For each basic block, build the dependence graph and perform instruction scheduling. |
private boolean |
printDepgraph(OptOptions options)
Should we print the dependence graph? |
private void |
scheduleBasicBlock()
Schedule a basic block. |
private void |
setGraphNode(Instruction i,
DepGraphNode n)
Set corresponding graph node for instruction. |
private boolean |
sortBasicBlock(int maxtime)
Sort basic block by Scheduled Time. |
| Methods inherited from class java.lang.Object |
|---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
| Field Detail |
|---|
private static final int VERBOSE
private static final boolean PRINT_CRITICAL_PATH_LENGTH
public static final int PREPASS
public static final int POSTPASS
public static final String[] PhaseName
private final int phase
private IR ir
private BasicBlock bb
private DepGraph dg
private DepGraphNode[] i2gn
| Constructor Detail |
|---|
Scheduler(int phase)
phase - the scheduling phase| Method Detail |
|---|
private boolean printDepgraph(OptOptions options)
options - the options object
void perform(IR _ir)
_ir - the IR in questionprivate static void debug(String s)
s - string to print
private static void debug(int depth,
String s)
depth - level of indentings - string to print
private void setGraphNode(Instruction i,
DepGraphNode n)
i - given instructionn - dependence graph node for instructionprivate DepGraphNode getGraphNode(Instruction i)
i - given instruction
private void computeCriticalPath(DepGraphNode n,
int depth)
n - start nodedepth - current DFS depthprivate int computeEarliestTime(Instruction i)
i - given instructionprivate boolean sortBasicBlock(int maxtime)
maxtime - the maximum scheduled timeprivate void scheduleBasicBlock()
|
|||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||||