org.jikesrvm.compilers.opt.controlflow
Class PostDominatorsPhase

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

public final class PostDominatorsPhase
extends CompilerPhase

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


Field Summary
private  boolean unfactor
          Should we unfactor the CFG?
 
Fields inherited from class org.jikesrvm.compilers.opt.driver.CompilerPhase
container
 
Constructor Summary
PostDominatorsPhase(boolean unfactor)
           
 
Method Summary
 String getName()
          Return a string representation of this phase
 void perform(IR ir)
          Main driver for the post-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, getClassConstructor, 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 Detail

PostDominatorsPhase

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

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 if the phase should be performed

getName

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

Specified by:
getName in class CompilerPhase
Returns:
"Post-Dominators"

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 post-dominator calculation.

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