Mercurial > hg > graal-jvmci-8
changeset 18442:758ecda76985
FrameMapBuilder: remove freeSpillSlot().
author | Josef Eisl <josef.eisl@jku.at> |
---|---|
date | Mon, 17 Nov 2014 16:14:47 +0100 |
parents | d11ce424f09d |
children | 1c92d437179b |
files | graal/com.oracle.graal.lir/src/com/oracle/graal/lir/DelayedFrameMapBuilder.java graal/com.oracle.graal.lir/src/com/oracle/graal/lir/FrameMapBuilder.java |
diffstat | 2 files changed, 1 insertions(+), 41 deletions(-) [+] |
line wrap: on
line diff
--- a/graal/com.oracle.graal.lir/src/com/oracle/graal/lir/DelayedFrameMapBuilder.java Tue Nov 11 18:17:17 2014 +0100 +++ b/graal/com.oracle.graal.lir/src/com/oracle/graal/lir/DelayedFrameMapBuilder.java Mon Nov 17 16:14:47 2014 +0100 @@ -55,22 +55,9 @@ this.mappables = new ArrayList<>(); } - private Set<VirtualStackSlot> freedSlots; private final List<FrameMappable> mappables; public VirtualStackSlot allocateSpillSlot(LIRKind kind) { - if (freedSlots != null) { - for (Iterator<VirtualStackSlot> iter = freedSlots.iterator(); iter.hasNext();) { - VirtualStackSlot s = iter.next(); - if (s.getLIRKind().equals(kind)) { - iter.remove(); - if (freedSlots.isEmpty()) { - freedSlots = null; - } - return s; - } - } - } SimpleVirtualStackSlot slot = new SimpleVirtualStackSlot(kind); stackSlots.add(slot); return slot; @@ -169,13 +156,6 @@ return codeCache; } - public void freeSpillSlot(VirtualStackSlot slot) { - if (freedSlots == null) { - freedSlots = new HashSet<>(); - } - freedSlots.add(slot); - } - public void callsMethod(CallingConvention cc) { calls.add(cc); } @@ -189,21 +169,7 @@ } // rewrite mappables.forEach(m -> m.map(mapping::get)); - // - if (freedSlots != null) { - // If the freed slots cover the complete spill area (except for the return - // address slot), then the spill size is reset to its initial value. - // Without this, frameNeedsAllocating() would never return true. - int total = 0; - for (VirtualStackSlot s : freedSlots) { - total += frameMap.getTarget().getSizeInBytes(s.getKind()); - } - if (total == frameMap.spillSize - frameMap.initialSpillSize) { - // reset spill area size - frameMap.spillSize = frameMap.initialSpillSize; - } - freedSlots = null; - } + frameMap.finish(); return frameMap; }
--- a/graal/com.oracle.graal.lir/src/com/oracle/graal/lir/FrameMapBuilder.java Tue Nov 11 18:17:17 2014 +0100 +++ b/graal/com.oracle.graal.lir/src/com/oracle/graal/lir/FrameMapBuilder.java Mon Nov 17 16:14:47 2014 +0100 @@ -80,12 +80,6 @@ CodeCacheProvider getCodeCache(); /** - * Frees a spill slot that was obtained via {@link #allocateSpillSlot(LIRKind)} such that it can - * be reused for the next allocation request for the same kind of slot. - */ - void freeSpillSlot(VirtualStackSlot reservedSlot); - - /** * Informs the frame map that the compiled code calls a particular method, which may need stack * space for outgoing arguments. *