public final class LinearScanPhase extends CompilerPhase
Modifier and Type | Field and Description |
---|---|
private static Constructor<CompilerPhase> |
constructor |
private SpillLocationManager |
spillManager
An object which manages spill location assignments.
|
container
Constructor and Description |
---|
LinearScanPhase() |
Modifier and Type | Method and Description |
---|---|
private ActiveSet |
createEmptySetOfActiveIntervals(IR ir) |
private SpillCostEstimator |
determineSpillCostEstimator(IR ir) |
Constructor<CompilerPhase> |
getClassConstructor()
Get a constructor object for this compiler phase
|
String |
getName() |
void |
perform(IR ir)
Perform the linear scan register allocation algorithm.
|
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)
This method determines if the phase should be run, based on the
Options object it is passed.
|
dumpIR, dumpIR, getCompilerPhaseConstructor, getCompilerPhaseConstructor, newExecution, performPhase, reportAdditionalStats, setContainer, verify
private SpillLocationManager spillManager
private static final Constructor<CompilerPhase> constructor
public LinearScanPhase()
public Constructor<CompilerPhase> getClassConstructor()
getClassConstructor
in class CompilerPhase
public boolean shouldPerform(OptOptions options)
CompilerPhase
shouldPerform
in class CompilerPhase
options
- the compiler options for the compilationtrue
because register allocation is requiredpublic String getName()
getName
in class CompilerPhase
public boolean printingEnabled(OptOptions options, boolean before)
CompilerPhase
printingEnabled
in class CompilerPhase
options
- the compiler options for the compilationbefore
- true when invoked before perform, false otherwise.public void perform(IR ir)
See TOPLAS 21(5), Sept 1999, p 895-913
perform
in class CompilerPhase
ir
- the IRprivate ActiveSet createEmptySetOfActiveIntervals(IR ir)
private SpillCostEstimator determineSpillCostEstimator(IR ir)