public class MoveResolver extends Object
Modifier and Type | Field and Description |
---|---|
private LinearScan |
allocator |
private int |
insertIdx |
private LIRInsertionBuffer |
insertionBuffer |
private List<Interval> |
mappingFrom |
private List<Value> |
mappingFromOpr |
private List<Interval> |
mappingTo |
private boolean |
multipleReadsAllowed |
private int[] |
registerBlocked |
Modifier | Constructor and Description |
---|---|
protected |
MoveResolver(LinearScan allocator) |
Modifier and Type | Method and Description |
---|---|
void |
addMapping(Interval fromInterval,
Interval toInterval) |
void |
addMapping(Value fromOpr,
Interval toInterval) |
private void |
appendInsertionBuffer() |
protected boolean |
areMultipleReadsAllowed() |
private void |
blockRegisters(Interval interval) |
protected void |
breakCycle(int spillCandidate) |
protected boolean |
checkEmpty() |
private static boolean |
checkIntervalLocation(Interval from,
Interval to,
Value fromOpr) |
protected void |
checkMultipleReads() |
private void |
createInsertionBuffer(List<LIRInstruction> list) |
protected LIRInstruction |
createMove(AllocatableValue fromOpr,
AllocatableValue toOpr,
AllocatableValue fromLocation,
AllocatableValue toLocation) |
protected LinearScan |
getAllocator() |
protected Interval |
getMappingFrom(int i) |
(package private) boolean |
hasMappings() |
private void |
insertMove(Interval fromInterval,
Interval toInterval) |
private void |
insertMove(Value fromOpr,
Interval toInterval) |
protected boolean |
isMoveToSelf(Value from,
Value to) |
protected int |
mappingFromSize() |
protected boolean |
mightBeBlocked(Value location) |
(package private) void |
moveInsertPosition(List<LIRInstruction> newInsertList,
int newInsertIdx) |
private void |
printMapping() |
(package private) void |
resolveAndAppendMoves() |
private void |
resolveMappings() |
private boolean |
safeToProcessMove(Interval from,
Interval to)
|
(package private) void |
setInsertPosition(List<LIRInstruction> insertList,
int insertIdx) |
(package private) void |
setMultipleReadsAllowed() |
protected void |
setValueBlocked(Value location,
int direction) |
protected void |
spillInterval(int spillCandidate,
Interval fromInterval,
StackSlotValue spillSlot) |
private void |
unblockRegisters(Interval interval) |
protected int |
valueBlocked(Value location) |
private boolean |
verifyBeforeResolve() |
protected void |
verifyStackSlotMapping() |
private final LinearScan allocator
private int insertIdx
private LIRInsertionBuffer insertionBuffer
private final List<Interval> mappingFrom
private final List<Value> mappingFromOpr
private boolean multipleReadsAllowed
private final int[] registerBlocked
protected MoveResolver(LinearScan allocator)
protected void setValueBlocked(Value location, int direction)
protected Interval getMappingFrom(int i)
protected int mappingFromSize()
protected int valueBlocked(Value location)
void setMultipleReadsAllowed()
protected boolean areMultipleReadsAllowed()
boolean hasMappings()
protected LinearScan getAllocator()
protected boolean checkEmpty()
protected void checkMultipleReads()
private boolean verifyBeforeResolve()
protected void verifyStackSlotMapping()
private static boolean checkIntervalLocation(Interval from, Interval to, Value fromOpr)
private void blockRegisters(Interval interval)
private void unblockRegisters(Interval interval)
private boolean safeToProcessMove(Interval from, Interval to)
protected boolean isMoveToSelf(Value from, Value to)
protected boolean mightBeBlocked(Value location)
private void createInsertionBuffer(List<LIRInstruction> list)
private void appendInsertionBuffer()
private void insertMove(Interval fromInterval, Interval toInterval)
protected LIRInstruction createMove(AllocatableValue fromOpr, AllocatableValue toOpr, AllocatableValue fromLocation, AllocatableValue toLocation)
private void insertMove(Value fromOpr, Interval toInterval)
private void resolveMappings()
protected void breakCycle(int spillCandidate)
protected void spillInterval(int spillCandidate, Interval fromInterval, StackSlotValue spillSlot)
private void printMapping()
void setInsertPosition(List<LIRInstruction> insertList, int insertIdx)
void moveInsertPosition(List<LIRInstruction> newInsertList, int newInsertIdx)
public void addMapping(Interval fromInterval, Interval toInterval)
public void addMapping(Value fromOpr, Interval toInterval)
void resolveAndAppendMoves()