|
|||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||||
java.lang.Objectorg.jikesrvm.compilers.opt.driver.CompilerPhase
org.jikesrvm.compilers.opt.controlflow.LoopUnrolling
public class LoopUnrolling
| Nested Class Summary | |
|---|---|
(package private) static class |
LoopUnrolling.RealDefs
|
| Field Summary | |
|---|---|
private static Constructor<CompilerPhase> |
constructor
Constructor for this compiler phase |
(package private) static boolean |
DEBUG
|
(package private) static int |
MAX_BLOCKS_FOR_NAIVE_UNROLLING
|
(package private) static int |
MaxInstructions
|
private static int |
theVisit
|
private int |
unrollFactor
|
| Fields inherited from class org.jikesrvm.compilers.opt.driver.CompilerPhase |
|---|
container |
| Constructor Summary | |
|---|---|
LoopUnrolling()
|
|
| Method Summary | |
|---|---|
private static Operand |
_follow(Operand use)
|
private static void |
_printDefs(Operand op)
|
(package private) static BasicBlock |
copyAndLinkBlock(IR ir,
BasicBlock seqLast,
BasicBlock block)
|
private static Instruction |
definingInstruction(Operand op)
|
(package private) static void |
deleteBranches(BasicBlock b)
|
private static Operand |
follow(Operand use)
|
Constructor<CompilerPhase> |
getClassConstructor()
Get a constructor object for this compiler phase |
String |
getName()
Returns the name of the phase. |
(package private) static void |
linkToLST(IR ir)
|
private static boolean |
loopInvariant(Operand op,
BitVector nloop,
int depth)
|
(package private) static BasicBlock[] |
makeSomeCopies(int unrollFactor,
IR ir,
BitVector nloop,
int blocks,
BasicBlock header,
BasicBlock exitBlock,
BasicBlock seqStart)
|
private static void |
markHeaders(LSTNode t)
|
private void |
naiveUnroller(LSTNode t,
IR ir)
|
void |
perform(IR ir)
This is the method that actually does the work of the phase. |
private static boolean |
printDefs(Operand op,
BitVector nloop,
int depth)
|
(package private) static void |
report(String s)
|
boolean |
shouldPerform(OptOptions options)
This method determines if the phase should be run, based on the Options object it is passed. |
(package private) boolean |
unrollLeaf(LSTNode t,
IR ir)
|
(package private) void |
unrollLoops(IR ir)
unroll the loops in the given IR. |
(package private) int |
unrollLoopTree(LSTNode t,
IR ir,
int target)
loop unrolling on a given loop structure sub tree |
| Methods inherited from class org.jikesrvm.compilers.opt.driver.CompilerPhase |
|---|
dumpIR, dumpIR, getCompilerPhaseConstructor, getCompilerPhaseConstructor, newExecution, performPhase, printingEnabled, reportAdditionalStats, setContainer, verify |
| Methods inherited from class java.lang.Object |
|---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
| Field Detail |
|---|
static final boolean DEBUG
static final int MAX_BLOCKS_FOR_NAIVE_UNROLLING
private static final Constructor<CompilerPhase> constructor
static final int MaxInstructions
private int unrollFactor
private static int theVisit
| Constructor Detail |
|---|
public LoopUnrolling()
| Method Detail |
|---|
public String getName()
getName in class CompilerPhasepublic Constructor<CompilerPhase> getClassConstructor()
getClassConstructor in class CompilerPhasepublic boolean shouldPerform(OptOptions options)
CompilerPhase
shouldPerform in class CompilerPhaseoptions - the compiler options for the compilation
public void perform(IR ir)
perform in class CompilerPhaseir - the IR on which to apply the phasevoid unrollLoops(IR ir)
int unrollLoopTree(LSTNode t,
IR ir,
int target)
t - ir -
boolean unrollLeaf(LSTNode t,
IR ir)
private void naiveUnroller(LSTNode t,
IR ir)
static void report(String s)
private static Operand follow(Operand use)
private static Operand _follow(Operand use)
private static Instruction definingInstruction(Operand op)
private static boolean loopInvariant(Operand op,
BitVector nloop,
int depth)
private static boolean printDefs(Operand op,
BitVector nloop,
int depth)
private static void _printDefs(Operand op)
static void linkToLST(IR ir)
private static void markHeaders(LSTNode t)
static BasicBlock[] makeSomeCopies(int unrollFactor,
IR ir,
BitVector nloop,
int blocks,
BasicBlock header,
BasicBlock exitBlock,
BasicBlock seqStart)
static BasicBlock copyAndLinkBlock(IR ir,
BasicBlock seqLast,
BasicBlock block)
static void deleteBranches(BasicBlock b)
|
|||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||||