public class IntervalWalker extends Object
Modifier and Type | Field and Description |
---|---|
protected Interval.RegisterBindingLists |
activeLists
Sorted list of intervals, live at the current position.
|
protected LinearScan |
allocator |
protected Interval.RegisterBinding |
currentBinding
The binding of the current interval being processed.
|
protected int |
currentPosition
The current position (intercept point through the intervals).
|
protected Interval.RegisterBindingLists |
inactiveLists
Sorted list of intervals in a life time hole at the current position.
|
protected Interval.RegisterBindingLists |
unhandledLists
Sorted list of intervals, not live before the current position.
|
Constructor and Description |
---|
IntervalWalker(LinearScan allocator,
Interval unhandledFixed,
Interval unhandledAny)
Creates a new interval walker.
|
Modifier and Type | Method and Description |
---|---|
protected boolean |
activateCurrent(Interval currentInterval)
Processes the
currentInterval interval in an attempt to allocate a physical register
to it and thus allow it to be moved to a list of active intervals. |
private void |
intervalMoved(Interval interval,
Interval.State from,
Interval.State to) |
private Interval |
nextInterval(int toOpId)
Get the next interval from unhandledLists which starts before or at
toOpId . |
protected void |
removeFromList(Interval interval) |
private void |
updateUnhandledStackIntervals(int opId)
Move unhandled stack intervals to
#activeLists active.
|
(package private) void |
walk() |
(package private) void |
walkBefore(int lirOpId) |
protected void |
walkTo(int toOpId)
Walk up to
toOpId . |
private void |
walkTo(Interval.State state,
int from) |
private void |
walkTo(Interval.State state,
int from,
Interval.RegisterBinding binding) |
protected final LinearScan allocator
protected Interval.RegisterBindingLists unhandledLists
protected Interval.RegisterBindingLists activeLists
protected Interval.RegisterBindingLists inactiveLists
protected int currentPosition
protected Interval.RegisterBinding currentBinding
IntervalWalker(LinearScan allocator, Interval unhandledFixed, Interval unhandledAny)
protected boolean activateCurrent(Interval currentInterval)
currentInterval
interval in an attempt to allocate a physical register
to it and thus allow it to be moved to a list of active intervals.true
if a register was allocated to the currentInterval
intervalvoid walkBefore(int lirOpId)
void walk()
protected void removeFromList(Interval interval)
private void walkTo(Interval.State state, int from)
private void walkTo(Interval.State state, int from, Interval.RegisterBinding binding)
private Interval nextInterval(int toOpId)
toOpId
. The returned interval is removed and currentBinding
is set.toOpId
.protected void walkTo(int toOpId)
toOpId
.private void intervalMoved(Interval interval, Interval.State from, Interval.State to)
private void updateUnhandledStackIntervals(int opId)
nextInterval(int)
.