# HG changeset patch # User Thomas Wuerthinger # Date 1422451456 -3600 # Node ID f1b9a421ebd8cc3fa0e8b8b0e93560bfe26ad6af # Parent 84bf57a0ddcbce66582f2dd134d6d3ed3d3148d6# Parent 986e2e87eedd5b00b6240aebdabe96ad86475e82 Merge. diff -r 986e2e87eedd -r f1b9a421ebd8 graal/com.oracle.graal.hotspot/src/com/oracle/graal/hotspot/meta/HotSpotResolvedJavaFieldImpl.java --- a/graal/com.oracle.graal.hotspot/src/com/oracle/graal/hotspot/meta/HotSpotResolvedJavaFieldImpl.java Wed Jan 28 12:19:27 2015 +0100 +++ b/graal/com.oracle.graal.hotspot/src/com/oracle/graal/hotspot/meta/HotSpotResolvedJavaFieldImpl.java Wed Jan 28 14:24:16 2015 +0100 @@ -66,7 +66,12 @@ } if (obj instanceof HotSpotResolvedJavaField) { HotSpotResolvedJavaFieldImpl that = (HotSpotResolvedJavaFieldImpl) obj; - return this.holder.equals(that.holder) && this.name.equals(that.name) && this.type.equals(that.type); + if (that.offset != this.offset) { + return false; + } else if (this.holder.equals(that.holder)) { + assert this.name.equals(that.name) && this.type.equals(that.type); + return true; + } } return false; } diff -r 986e2e87eedd -r f1b9a421ebd8 graal/com.oracle.graal.phases/src/com/oracle/graal/phases/schedule/SchedulePhase.java --- a/graal/com.oracle.graal.phases/src/com/oracle/graal/phases/schedule/SchedulePhase.java Wed Jan 28 12:19:27 2015 +0100 +++ b/graal/com.oracle.graal.phases/src/com/oracle/graal/phases/schedule/SchedulePhase.java Wed Jan 28 14:24:16 2015 +0100 @@ -1068,7 +1068,7 @@ } private void addToLatestSorting(ValueNode i, SortState state) { - if (i == null || state.isVisited(i) || cfg.getNodeToBlock().get(i) != state.currentBlock() || i instanceof PhiNode) { + if (i == null || state.isVisited(i) || cfg.getNodeToBlock().get(i) != state.currentBlock() || i instanceof PhiNode || i instanceof ProxyNode) { return; } @@ -1083,9 +1083,7 @@ addUnscheduledToLatestSorting((FrameState) input, state); } } else { - if (!(i instanceof ProxyNode && input instanceof LoopExitNode)) { - addToLatestSorting((ValueNode) input, state); - } + addToLatestSorting((ValueNode) input, state); } } @@ -1130,7 +1128,7 @@ private void addToEarliestSorting(Block b, ValueNode i, List sortedInstructions, NodeBitMap visited) { ValueNode instruction = i; while (true) { - if (instruction == null || visited.isMarked(instruction) || cfg.getNodeToBlock().get(instruction) != b || instruction instanceof PhiNode) { + if (instruction == null || visited.isMarked(instruction) || cfg.getNodeToBlock().get(instruction) != b || instruction instanceof PhiNode || instruction instanceof ProxyNode) { return; } @@ -1139,11 +1137,7 @@ if (usage instanceof VirtualState) { // only fixed nodes can have VirtualState -> no need to schedule them } else { - if (instruction instanceof LoopExitNode && usage instanceof ProxyNode) { - // value proxies should be scheduled before the loopexit, not after - } else { - addToEarliestSorting(b, (ValueNode) usage, sortedInstructions, visited); - } + addToEarliestSorting(b, (ValueNode) usage, sortedInstructions, visited); } } diff -r 986e2e87eedd -r f1b9a421ebd8 graal/com.oracle.graal.phases/src/com/oracle/graal/phases/util/GraphOrder.java --- a/graal/com.oracle.graal.phases/src/com/oracle/graal/phases/util/GraphOrder.java Wed Jan 28 12:19:27 2015 +0100 +++ b/graal/com.oracle.graal.phases/src/com/oracle/graal/phases/util/GraphOrder.java Wed Jan 28 14:24:16 2015 +0100 @@ -180,13 +180,17 @@ loopEntryStates.put((LoopBeginNode) node, currentState.copy()); } } else if (node instanceof ProxyNode) { - for (Node input : node.inputs()) { - if (input != ((ProxyNode) node).proxyPoint()) { - assert currentState.isMarked(input) : input + " not available at " + node + " in block " + block + "\n" + list; - } - } + assert false : "proxy nodes should not be in the schedule"; } else if (node instanceof LoopExitNode) { if (graph.hasValueProxies()) { + for (ProxyNode proxy : ((LoopExitNode) node).proxies()) { + for (Node input : proxy.inputs()) { + if (input != proxy.proxyPoint()) { + assert currentState.isMarked(input) : input + " not available at " + proxy + " in block " + block + "\n" + list; + } + } + } + // loop contents are only accessible via proxies at the exit currentState.clearAll(); currentState.markAll(loopEntryStates.get(((LoopExitNode) node).loopBegin()));