private static final class LSStackSlotAllocator.Allocator extends Object
Modifier and Type | Class and Description |
---|---|
private static class |
LSStackSlotAllocator.Allocator.SlotSize |
Modifier and Type | Field and Description |
---|---|
private PriorityQueue<StackInterval> |
active |
(package private) ValueProcedure |
assignSlot |
private FrameMapBuilderTool |
frameMapBuilder |
private EnumMap<LSStackSlotAllocator.Allocator.SlotSize,Deque<jdk.internal.jvmci.code.StackSlot>> |
freeSlots |
private LIR |
lir |
private int |
maxOpId |
private List<? extends AbstractBlockBase<?>> |
sortedBlocks |
private StackInterval[] |
stackSlotMap |
private PriorityQueue<StackInterval> |
unhandled |
Modifier | Constructor and Description |
---|---|
private |
Allocator(LIR lir,
FrameMapBuilderTool frameMapBuilder) |
Modifier and Type | Method and Description |
---|---|
private StackInterval |
activateNext()
Gets the next unhandled interval and finishes handled intervals.
|
private int |
activePeekId()
Gets the lowest
end position of all active intervals. |
private void |
allocate() |
private void |
allocateSlot(StackInterval current) |
private void |
allocateStackSlots() |
private void |
assignStackSlots(Set<LIRInstruction> usePos) |
private Set<LIRInstruction> |
buildIntervals() |
private void |
dumpIntervals(String label) |
private jdk.internal.jvmci.code.StackSlot |
findFreeSlot(SimpleVirtualStackSlot slot)
Gets a free stack slot for
slot or null if there is none. |
private void |
finished(StackInterval interval)
Finishes
interval by adding its location to the list of free stack slots. |
private void |
forEachInterval(Consumer<StackInterval> proc) |
private LSStackSlotAllocator.Allocator.SlotSize |
forKind(jdk.internal.jvmci.meta.LIRKind kind) |
private void |
freeSlot(jdk.internal.jvmci.code.StackSlot slot)
Adds a stack slot to the list of free slots.
|
private StackInterval |
get(jdk.internal.jvmci.code.VirtualStackSlot stackSlot) |
private Deque<jdk.internal.jvmci.code.StackSlot> |
getOrInitFreeSlots(LSStackSlotAllocator.Allocator.SlotSize size) |
private Deque<jdk.internal.jvmci.code.StackSlot> |
getOrNullFreeSlots(LSStackSlotAllocator.Allocator.SlotSize size) |
private int |
maxOpId()
Gets the highest instruction id.
|
private static int |
numberInstructions(LIR lir,
List<? extends AbstractBlockBase<?>> sortedBlocks)
Numbers all instructions in all blocks.
|
private void |
verifyIntervals() |
private final FrameMapBuilderTool frameMapBuilder
private final StackInterval[] stackSlotMap
private final PriorityQueue<StackInterval> unhandled
private final PriorityQueue<StackInterval> active
private final List<? extends AbstractBlockBase<?>> sortedBlocks
private final int maxOpId
private EnumMap<LSStackSlotAllocator.Allocator.SlotSize,Deque<jdk.internal.jvmci.code.StackSlot>> freeSlots
ValueProcedure assignSlot
private Allocator(LIR lir, FrameMapBuilderTool frameMapBuilder)
private void allocate()
private static int numberInstructions(LIR lir, List<? extends AbstractBlockBase<?>> sortedBlocks)
private Set<LIRInstruction> buildIntervals()
private void verifyIntervals()
private void allocateStackSlots()
private void allocateSlot(StackInterval current)
private LSStackSlotAllocator.Allocator.SlotSize forKind(jdk.internal.jvmci.meta.LIRKind kind)
private Deque<jdk.internal.jvmci.code.StackSlot> getOrNullFreeSlots(LSStackSlotAllocator.Allocator.SlotSize size)
size
or null
if there is none.private Deque<jdk.internal.jvmci.code.StackSlot> getOrInitFreeSlots(LSStackSlotAllocator.Allocator.SlotSize size)
size
. If there is none a list is
created.private jdk.internal.jvmci.code.StackSlot findFreeSlot(SimpleVirtualStackSlot slot)
slot
or null
if there is none.private void freeSlot(jdk.internal.jvmci.code.StackSlot slot)
private StackInterval activateNext()
private int activePeekId()
end position
of all active intervals. If there
is none Integer.MAX_VALUE
is returned.private void finished(StackInterval interval)
interval
by adding its location to the list of free stack slots.private void assignStackSlots(Set<LIRInstruction> usePos)
private int maxOpId()
private StackInterval get(jdk.internal.jvmci.code.VirtualStackSlot stackSlot)
private void forEachInterval(Consumer<StackInterval> proc)
private void dumpIntervals(String label)