org.jikesrvm.compilers.opt.controlflow
Class DominatorsPhase

java.lang.Object
  extended by org.jikesrvm.compilers.opt.driver.CompilerPhase
      extended by org.jikesrvm.compilers.opt.controlflow.DominatorsPhase

public final class DominatorsPhase
extends CompilerPhase

Driver routine for dominator computation. This phase invokes the Lengauer-Tarjan dominator calculation.


Field Summary
private static Constructor<CompilerPhase> constructor
          Constructor for this compiler phase
private  boolean unfactor
          Should we unfactor the CFG?
 
Fields inherited from class org.jikesrvm.compilers.opt.driver.CompilerPhase
container
 
Constructor Summary
DominatorsPhase(boolean unfactor)
           
 
Method Summary
 Constructor<CompilerPhase> getClassConstructor()
          Get a constructor object for this compiler phase
 String getName()
          Return a string representation of this phase
 void perform(IR ir)
          Main driver for the dominator calculation.
 boolean printingEnabled(OptOptions options, boolean before)
          Should the IR be printed before and/or after this phase?
 boolean shouldPerform(OptOptions options)
          Should this phase be performed?
 
Methods inherited from class org.jikesrvm.compilers.opt.driver.CompilerPhase
dumpIR, dumpIR, getCompilerPhaseConstructor, getCompilerPhaseConstructor, newExecution, performPhase, reportAdditionalStats, setContainer, verify
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

unfactor

private final boolean unfactor
Should we unfactor the CFG?


constructor

private static final Constructor<CompilerPhase> constructor
Constructor for this compiler phase

Constructor Detail

DominatorsPhase

public DominatorsPhase(boolean unfactor)
Parameters:
unfactor - Should we unfactor the CFG before computing dominators?
Method Detail

getClassConstructor

public Constructor<CompilerPhase> getClassConstructor()
Get a constructor object for this compiler phase

Overrides:
getClassConstructor in class CompilerPhase
Returns:
compiler phase constructor

shouldPerform

public boolean shouldPerform(OptOptions options)
Should this phase be performed? This is a member of a composite phase, so always return true. The parent composite phase will dictate.

Overrides:
shouldPerform in class CompilerPhase
Parameters:
options - controlling compiler options
Returns:
true

getName

public String getName()
Return a string representation of this phase

Specified by:
getName in class CompilerPhase
Returns:
"Dominators + LpStrTree"

printingEnabled

public boolean printingEnabled(OptOptions options,
                               boolean before)
Should the IR be printed before and/or after this phase?

Overrides:
printingEnabled in class CompilerPhase
Parameters:
options - controlling compiler options
before - query control
Returns:
false

perform

public void perform(IR ir)
Main driver for the dominator calculation.

Specified by:
perform in class CompilerPhase
Parameters:
ir - the IR on which to apply the phase