public class LinearScanLifetimeAnalysisPhase extends Object
| Modifier and Type | Field and Description |
|---|---|
protected LinearScan |
allocator |
protected DebugContext |
debug |
| Modifier | Constructor and Description |
|---|---|
protected |
LinearScanLifetimeAnalysisPhase(LinearScan linearScan) |
| Modifier and Type | Method and Description |
|---|---|
protected void |
addDef(AllocatableValue operand,
LIRInstruction op,
Interval.RegisterPriority registerPriority,
<any> kind,
boolean detailedAsserts) |
protected void |
addRegisterHint(LIRInstruction op,
Value targetValue,
LIRInstruction.OperandMode mode,
EnumSet<LIRInstruction.OperandFlag> flags,
boolean hintAtDef) |
protected void |
addTemp(AllocatableValue operand,
int tempPos,
Interval.RegisterPriority registerPriority,
<any> kind,
boolean detailedAsserts) |
protected void |
addUse(AllocatableValue operand,
int from,
int to,
Interval.RegisterPriority registerPriority,
<any> kind,
boolean detailedAsserts) |
void |
apply(TargetDescription target,
LIRGenerationResult lirGenRes,
AllocationPhase.AllocationContext context) |
void |
apply(TargetDescription target,
LIRGenerationResult lirGenRes,
AllocationPhase.AllocationContext context,
boolean dumpLIR) |
protected void |
buildIntervals(boolean detailedAsserts) |
protected void |
changeSpillDefinitionPos(LIRInstruction op,
AllocatableValue operand,
Interval interval,
int defPos)
Eliminates moves from register to stack if the stack slot is known to be correct.
|
protected void |
computeGlobalLiveSets()
Performs a backward dataflow analysis to compute global live sets (i.e.
|
protected Constant |
getMaterializedValue(LIRInstruction op,
Value operand,
Interval interval)
Returns a value for a interval definition, which can be used for re-materialization.
|
protected int |
getOperandNumber(Value operand) |
protected void |
handleMethodArguments(LIRInstruction op)
Optimizes moves related to incoming stack based arguments.
|
protected void |
numberInstructions()
Numbers all instructions in all blocks.
|
protected static Interval.RegisterPriority |
registerPriorityOfInputOperand(EnumSet<LIRInstruction.OperandFlag> flags)
Determines the priority which with an instruction's input operand will be allocated a
register.
|
protected Interval.RegisterPriority |
registerPriorityOfOutputOperand(LIRInstruction op)
Determines the register priority for an instruction's output/result operand.
|
protected void |
reportFailure(int numBlocks) |
protected void |
run(TargetDescription target,
LIRGenerationResult lirGenRes,
AllocationPhase.AllocationContext context) |
String |
toString() |
protected void |
verifyLiveness() |
protected final LinearScan allocator
protected final DebugContext debug
protected LinearScanLifetimeAnalysisPhase(LinearScan linearScan)
linearScan - protected void run(TargetDescription target,
LIRGenerationResult lirGenRes,
AllocationPhase.AllocationContext context)
protected void numberInstructions()
protected int getOperandNumber(Value operand)
protected void computeGlobalLiveSets()
LinearScan.BlockData.liveIn and LinearScan.BlockData.liveOut) for each block.protected void reportFailure(int numBlocks)
protected void verifyLiveness()
protected void addUse(AllocatableValue operand,
int from,
int to,
Interval.RegisterPriority registerPriority,
<any> kind,
boolean detailedAsserts)
protected void addTemp(AllocatableValue operand,
int tempPos,
Interval.RegisterPriority registerPriority,
<any> kind,
boolean detailedAsserts)
protected void addDef(AllocatableValue operand,
LIRInstruction op,
Interval.RegisterPriority registerPriority,
<any> kind,
boolean detailedAsserts)
protected void handleMethodArguments(LIRInstruction op)
protected void addRegisterHint(LIRInstruction op, Value targetValue, LIRInstruction.OperandMode mode, EnumSet<LIRInstruction.OperandFlag> flags, boolean hintAtDef)
protected void changeSpillDefinitionPos(LIRInstruction op, AllocatableValue operand, Interval interval, int defPos)
op - operand - protected Interval.RegisterPriority registerPriorityOfOutputOperand(LIRInstruction op)
protected static Interval.RegisterPriority registerPriorityOfInputOperand(EnumSet<LIRInstruction.OperandFlag> flags)
protected void buildIntervals(boolean detailedAsserts)
protected Constant getMaterializedValue(LIRInstruction op, Value operand, Interval interval)
op - An instruction which defines a valueoperand - The destination operand of the instructioninterval - The interval for this defined value.public final void apply(TargetDescription target,
LIRGenerationResult lirGenRes,
AllocationPhase.AllocationContext context)
public final void apply(TargetDescription target,
LIRGenerationResult lirGenRes,
AllocationPhase.AllocationContext context,
boolean dumpLIR)