org.jikesrvm.compilers.opt.regalloc
Class RegisterAllocator

java.lang.Object
  extended by org.jikesrvm.compilers.opt.driver.OptimizationPlanElement
      extended by org.jikesrvm.compilers.opt.driver.OptimizationPlanCompositeElement
          extended by org.jikesrvm.compilers.opt.regalloc.RegisterAllocator

public final class RegisterAllocator
extends OptimizationPlanCompositeElement

Driver routine for register allocation


Nested Class Summary
private static class RegisterAllocator.RegisterAllocPreparation
           
 
Constructor Summary
RegisterAllocator()
           
 
Method Summary
 String getName()
           
 boolean printingEnabled(OptOptions options, boolean before)
          Returns true if the phase wants the IR dumped before and/or after it runs.
 boolean shouldPerform(OptOptions options)
          Determine, possibly by consulting the passed options object, if this optimization plan element should be performed.
 
Methods inherited from class org.jikesrvm.compilers.opt.driver.OptimizationPlanCompositeElement
compose, elapsedTime, initializeForMeasureCompilation, perform, reportStats
 
Methods inherited from class org.jikesrvm.compilers.opt.driver.OptimizationPlanElement
prettyPrintTime
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

RegisterAllocator

public RegisterAllocator()
Method Detail

shouldPerform

public boolean shouldPerform(OptOptions options)
Description copied from class: OptimizationPlanElement
Determine, possibly by consulting the passed options object, if this optimization plan element should be performed.

Overrides:
shouldPerform in class OptimizationPlanCompositeElement
Parameters:
options - The Options object for the current compilation.
Returns:
true if the plan element should be performed.

getName

public String getName()
Overrides:
getName in class OptimizationPlanCompositeElement
Returns:
a String which is the name of the phase.

printingEnabled

public boolean printingEnabled(OptOptions options,
                               boolean before)
Description copied from class: OptimizationPlanCompositeElement
Returns true if the phase wants the IR dumped before and/or after it runs. By default, printing is not enabled. Subclasses should overide this method if they want to provide IR dumping.

Overrides:
printingEnabled in class OptimizationPlanCompositeElement
Parameters:
options - the compiler options for the compilation
before - true when invoked before perform, false otherwise.
Returns:
true if the IR should be printed, false otherwise.