# HG changeset patch # User Josef Eisl # Date 1422697760 -3600 # Node ID 3ec39188b0eea4a75befb65f5f3b75aa6f16c7e1 # Parent e22286559a8b002661fd19fa4cdcf83042aeae40 StackInterval: remove use position list. diff -r e22286559a8b -r 3ec39188b0ee graal/com.oracle.graal.lir/src/com/oracle/graal/lir/stackslotalloc/LSStackSlotAllocator.java --- a/graal/com.oracle.graal.lir/src/com/oracle/graal/lir/stackslotalloc/LSStackSlotAllocator.java Sat Jan 31 10:35:50 2015 +0100 +++ b/graal/com.oracle.graal.lir/src/com/oracle/graal/lir/stackslotalloc/LSStackSlotAllocator.java Sat Jan 31 10:49:20 2015 +0100 @@ -294,16 +294,16 @@ if (Debug.isMeterEnabled() && !(interval.from() == 0 && interval.to() == maxOpId())) { uninitializedSlots.increment(); } - interval.addDef(0); - interval.addUse(maxOpId()); + interval.addFrom(0); + interval.addTo(maxOpId()); } else { - interval.addUse(inst.id()); + interval.addTo(inst.id()); } } private void addDef(VirtualStackSlot stackSlot, LIRInstruction inst) { StackInterval interval = getOrCreateInterval(stackSlot); - interval.addDef(inst.id()); + interval.addFrom(inst.id()); } } diff -r e22286559a8b -r 3ec39188b0ee graal/com.oracle.graal.lir/src/com/oracle/graal/lir/stackslotalloc/StackInterval.java --- a/graal/com.oracle.graal.lir/src/com/oracle/graal/lir/stackslotalloc/StackInterval.java Sat Jan 31 10:35:50 2015 +0100 +++ b/graal/com.oracle.graal.lir/src/com/oracle/graal/lir/stackslotalloc/StackInterval.java Sat Jan 31 10:49:20 2015 +0100 @@ -22,11 +22,8 @@ */ package com.oracle.graal.lir.stackslotalloc; -import java.util.*; - import com.oracle.graal.api.code.*; import com.oracle.graal.api.meta.*; -import com.oracle.graal.debug.*; public final class StackInterval { @@ -36,19 +33,11 @@ private final LIRKind kind; private int from = INVALID_START; private int to = INVALID_END; - private final SortedMap usePos; private StackSlot location; - public enum UseType { - // Prefixes for c1viz - M_USE, - S_DEF - } - public StackInterval(VirtualStackSlot operand, LIRKind kind) { this.operand = operand; this.kind = kind; - this.usePos = new TreeMap<>(); } public boolean verify(LSStackSlotAllocator.Allocator allocator) { @@ -61,20 +50,6 @@ return operand; } - public void addUse(int opId) { - addTo(opId); - Debug.log("Adding use pos: %d", opId); - // we might overwrite the previous entry - usePos.put(opId, UseType.M_USE); - } - - public void addDef(int opId) { - addFrom(opId); - Debug.log("Adding def pos: %d", opId); - // we might overwrite the previous entry - usePos.put(opId, UseType.S_DEF); - } - public void addTo(int opId) { if (opId >= to) { to = opId; @@ -111,10 +86,6 @@ return to; } - public SortedMap usePosList() { - return usePos; - } - public void fixFrom() { if (from == INVALID_START) { from = 0; diff -r e22286559a8b -r 3ec39188b0ee graal/com.oracle.graal.printer/src/com/oracle/graal/printer/CFGPrinter.java --- a/graal/com.oracle.graal.printer/src/com/oracle/graal/printer/CFGPrinter.java Sat Jan 31 10:35:50 2015 +0100 +++ b/graal/com.oracle.graal.printer/src/com/oracle/graal/printer/CFGPrinter.java Sat Jan 31 10:49:20 2015 +0100 @@ -26,7 +26,6 @@ import java.io.*; import java.util.*; -import java.util.Map.Entry; import com.oracle.graal.api.code.*; import com.oracle.graal.api.meta.*; @@ -39,7 +38,6 @@ import com.oracle.graal.java.BciBlockMapping.BciBlock; import com.oracle.graal.lir.*; import com.oracle.graal.lir.stackslotalloc.*; -import com.oracle.graal.lir.stackslotalloc.StackInterval.UseType; import com.oracle.graal.nodeinfo.*; import com.oracle.graal.nodes.*; import com.oracle.graal.nodes.calc.*; @@ -588,18 +586,8 @@ out.printf("[%d, %d[", interval.from(), interval.to()); - // print use positions - int prev = -1; - for (Entry e : interval.usePosList().entrySet()) { - int usePos = e.getKey(); - UseType useType = e.getValue(); - assert prev <= usePos : "use positions not sorted"; - out.printf("%d %s ", usePos, useType); - prev = usePos; - } - // print spill state - out.printf(" \"%s\"", "NOT_SUPPORTED"); + out.printf(" \"NOT_SUPPORTED\""); out.println(); }