org.jikesrvm.compilers.opt
Class NullCheckCombining

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

public class NullCheckCombining
extends CompilerPhase

This module performs two tasks:

Doing (1) more or less implies either (a) doing (2) or (b) making large changes to the MIR operator set such that all load/stores produce validation results. Although this would be possible, it would not be a trivial change. So, until we have an urgent need to preserve guard operands all the way through the MIR, we'll take the easy way out.


Field Summary
 
Fields inherited from class org.jikesrvm.compilers.opt.driver.CompilerPhase
container
 
Constructor Summary
NullCheckCombining()
           
 
Method Summary
private  boolean canFold(Instruction s, Operand activeGuard, boolean isStore)
           
 String getName()
           
private  boolean isExplicitLoad(Instruction s, Operator op)
           
private  boolean isExplicitStore(Instruction s, Operator op)
           
 CompilerPhase newExecution(IR ir)
          Return this instance of this phase.
 void perform(IR ir)
          Perform nullcheck combining and validation register removal.
 
Methods inherited from class org.jikesrvm.compilers.opt.driver.CompilerPhase
dumpIR, dumpIR, getClassConstructor, getCompilerPhaseConstructor, getCompilerPhaseConstructor, performPhase, printingEnabled, reportAdditionalStats, setContainer, shouldPerform, verify
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

NullCheckCombining

public NullCheckCombining()
Method Detail

newExecution

public CompilerPhase newExecution(IR ir)
Return this instance of this phase. This phase contains no per-compilation instance fields.

Overrides:
newExecution in class CompilerPhase
Parameters:
ir - not used
Returns:
this

getName

public final String getName()
Specified by:
getName in class CompilerPhase
Returns:
a String which is the name of the phase.

perform

public void perform(IR ir)
Perform nullcheck combining and validation register removal.

Specified by:
perform in class CompilerPhase
Parameters:
ir - the IR to transform

isExplicitStore

private boolean isExplicitStore(Instruction s,
                                Operator op)

isExplicitLoad

private boolean isExplicitLoad(Instruction s,
                               Operator op)

canFold

private boolean canFold(Instruction s,
                        Operand activeGuard,
                        boolean isStore)