# HG changeset patch # User Lukas Stadler # Date 1397727141 -7200 # Node ID 43f26891ed2e47ad2be8b7258f2cbfb2eed5b4c6 # Parent 530c56922a593d53fe7491db2c89b37d12d097dd slightly more relaxed GraphOrder assertion diff -r 530c56922a59 -r 43f26891ed2e 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 Thu Apr 17 11:32:14 2014 +0200 +++ b/graal/com.oracle.graal.phases/src/com/oracle/graal/phases/util/GraphOrder.java Thu Apr 17 11:32:21 2014 +0200 @@ -60,8 +60,8 @@ } else { for (Node input : node.inputs()) { if (!visited.isMarked(input)) { - if (input instanceof FrameState && node instanceof StateSplit && input == ((StateSplit) node).stateAfter()) { - // nothing to do - after frame states are known, allowed cycles + if (input instanceof FrameState) { + // nothing to do - frame states are known, allowed cycles } else { assert false : "unexpected cycle detected at input " + node + " -> " + input; } @@ -157,6 +157,9 @@ FrameState pendingStateAfter = null; for (final ScheduledNode node : list) { FrameState stateAfter = node instanceof StateSplit ? ((StateSplit) node).stateAfter() : null; + if (node instanceof InfopointNode) { + stateAfter = ((InfopointNode) node).getState(); + } if (pendingStateAfter != null && node instanceof FixedNode) { pendingStateAfter.applyToNonVirtual(new NodeClosure() { @@ -181,15 +184,23 @@ } } } else if (node instanceof LoopExitNode) { - // the contents of the loop are only accessible via proxies at the exit - currentState.clearAll(); - currentState.markAll(loopEntryStates.get(((LoopExitNode) node).loopBegin())); + if (!graph.isAfterFloatingReadPhase()) { + // loop contents are only accessible via proxies at the exit + currentState.clearAll(); + currentState.markAll(loopEntryStates.get(((LoopExitNode) node).loopBegin())); + } // Loop proxies aren't scheduled, so they need to be added explicitly currentState.markAll(((LoopExitNode) node).proxies()); } else { for (Node input : node.inputs()) { if (input != stateAfter) { - assert currentState.isMarked(input) : input + " not available at " + node + " in block " + block + "\n" + list; + if (input instanceof FrameState) { + ((FrameState) input).applyToNonVirtual((usage, nonVirtual) -> { + assert currentState.isMarked(nonVirtual) : nonVirtual + " not available at " + node + " in block " + block + "\n" + list; + }); + } else { + assert currentState.isMarked(input) : input + " not available at " + node + " in block " + block + "\n" + list; + } } } }