public class LinearScan extends Object
| Modifier and Type | Class and Description |
|---|---|
static class |
LinearScan.BlockData |
static class |
LinearScan.Options |
| Modifier and Type | Field and Description |
|---|---|
protected DebugContext |
debug |
boolean |
detailedAsserts |
static int |
DOMINATOR_SPILL_MOVE_ID |
protected Interval |
intervalEndMarker
Sentinel interval to denote the end of an interval list.
|
Range |
rangeEndMarker |
| Modifier | Constructor and Description |
|---|---|
protected |
LinearScan(TargetDescription target,
LIRGenerationResult res,
MoveFactory spillMoveFactory,
RegisterAllocationConfig regAllocConfig,
AbstractBlockBase<?>[] sortedBlocks,
boolean neverSpillConstants) |
public static final int DOMINATOR_SPILL_MOVE_ID
protected final DebugContext debug
protected final Interval intervalEndMarker
public final Range rangeEndMarker
public final boolean detailedAsserts
protected LinearScan(TargetDescription target,
LIRGenerationResult res,
MoveFactory spillMoveFactory,
RegisterAllocationConfig regAllocConfig,
AbstractBlockBase<?>[] sortedBlocks,
boolean neverSpillConstants)
public int getVariableNumber(int operand)
operand - -1 if the supplied operand
describes a registerpublic LIRGenerationResult getLIRGenerationResult()
public Interval intervalEndMarker()
public OptionValues getOptions()
public DebugContext getDebug()
public int getFirstLirInstructionId(AbstractBlockBase<?> block)
public int getLastLirInstructionId(AbstractBlockBase<?> block)
public MoveFactory getSpillMoveFactory()
protected MoveResolver createMoveResolver()
public static boolean isVariableOrRegister(Value value)
public LinearScan.BlockData getBlockData(AbstractBlockBase<?> block)
public RegisterAttributes attributes(Register reg)
public Interval[] intervals()
public int blockCount()
public AbstractBlockBase<?> blockAt(int index)
public int liveSetSize()
LinearScan.BlockData.liveIn and LinearScan.BlockData.liveOut sets for a basic
block. These sets do not include any operands allocated as a result of creating
derived intervals.public Interval intervalFor(Value operand)
public Interval getOrCreateInterval(AllocatableValue operand)
public LIRInstruction instructionForId(int opId)
LIRInstruction based on its id.opId - an instruction id== idpublic AbstractBlockBase<?> blockForId(int opId)
opId - an instruction idopIdpublic boolean isProcessed(Value operand)
protected void sortIntervalsBeforeAllocation()
public Interval splitChildAtOpId(Interval interval, int opId, LIRInstruction.OperandMode mode)
protected void allocate(TargetDescription target,
LIRGenerationResult lirGenRes,
AllocationPhase.AllocationContext context)
protected void beforeSpillMoveElimination()
protected LinearScanLifetimeAnalysisPhase createLifetimeAnalysisPhase()
protected LinearScanRegisterAllocationPhase createRegisterAllocationPhase()
protected LinearScanOptimizeSpillPositionPhase createOptimizeSpillPositionPhase()
protected LinearScanResolveDataFlowPhase createResolveDataFlowPhase()
protected LinearScanEliminateSpillMovePhase createSpillMoveEliminationPhase()
protected LinearScanAssignLocationsPhase createAssignLocationsPhase()
public void printIntervals(String label)
protected void verifyIntervals()
public LIR getLIR()
public FrameMapBuilder getFrameMapBuilder()
public AbstractBlockBase<?>[] sortedBlocks()
public RegisterArray getRegisters()
public RegisterAllocationConfig getRegisterAllocationConfig()
public boolean callKillsRegisters()