Mercurial > hg > graal-compiler
changeset 15243:43f26891ed2e
slightly more relaxed GraphOrder assertion
author | Lukas Stadler <lukas.stadler@oracle.com> |
---|---|
date | Thu, 17 Apr 2014 11:32:21 +0200 |
parents | 530c56922a59 |
children | a7d08ab4842f |
files | graal/com.oracle.graal.phases/src/com/oracle/graal/phases/util/GraphOrder.java |
diffstat | 1 files changed, 17 insertions(+), 6 deletions(-) [+] |
line wrap: on
line diff
--- 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<Node>() { @@ -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; + } } } }