|
|||||||||||
| 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.DominanceFrontier
public class DominanceFrontier
Calculate dominance frontier for a set of basic blocks.
Uses the algorithm of Cytron et al., TOPLAS Oct. 91:
for each X in a bottom-up traversal of the dominator tree do
DF(X) < - null
for each Y in Succ(X) do
if (idom(Y)!=X) then DF(X) <- DF(X) U Y
end
for each Z in {idom(z) = X} do
for each Y in DF(Z) do
if (idom(Y)!=X) then DF(X) <- DF(X) U Y
end
end
TODO: we do not support IRs with exception handlers!!
| Field Summary |
|---|
| Fields inherited from class org.jikesrvm.compilers.opt.driver.CompilerPhase |
|---|
container |
| Constructor Summary | |
|---|---|
DominanceFrontier()
|
|
| Method Summary | |
|---|---|
static BitVector |
getDominanceFrontier(IR ir,
BitVector bits)
Calculate the dominance frontier for the set of basic blocks represented by a BitVector. |
static BitVector |
getIteratedDominanceFrontier(IR ir,
BitVector S)
Calculate the iterated dominance frontier for a set of basic blocks represented by a BitVector. |
String |
getName()
Return a String representation for this phase |
CompilerPhase |
newExecution(IR ir)
Return this instance of this phase. |
void |
perform(IR ir)
Calculate the dominance frontier for each basic block in the CFG. |
boolean |
printingEnabled(OptOptions options,
boolean before)
Should the IR be printed either before or after performing this phase? |
boolean |
shouldPerform(OptOptions options)
Should this phase be performed? |
| Methods inherited from class org.jikesrvm.compilers.opt.driver.CompilerPhase |
|---|
dumpIR, dumpIR, getClassConstructor, getCompilerPhaseConstructor, getCompilerPhaseConstructor, performPhase, reportAdditionalStats, setContainer, verify |
| Methods inherited from class java.lang.Object |
|---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
| Constructor Detail |
|---|
public DominanceFrontier()
| Method Detail |
|---|
public final boolean shouldPerform(OptOptions options)
shouldPerform in class CompilerPhaseoptions - controlling compiler options
public CompilerPhase newExecution(IR ir)
newExecution in class CompilerPhaseir - not used
public final String getName()
getName in class CompilerPhase
public final boolean printingEnabled(OptOptions options,
boolean before)
printingEnabled in class CompilerPhaseoptions - controlling compiler optionsbefore - true iff querying before the phase
public void perform(IR ir)
NOTE: The dominator tree MUST be calculated BEFORE calling this routine.
perform in class CompilerPhaseir - the governing IR
public static BitVector getDominanceFrontier(IR ir,
BitVector bits)
NOTE: The dominance frontiers for the IR MUST be calculated BEFORE calling this routine.
ir - the governing IRbits - the BitVector representing the set of basic blocks
public static BitVector getIteratedDominanceFrontier(IR ir,
BitVector S)
NOTE: The dominance frontiers for the IR MUST be calculated BEFORE calling this routine.
ir - The governing IRS - The BitVector representing the set of basic blocks
BitVector representing the dominance frontier for
the set
|
|||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||||