# HG changeset patch # User Roland Schatz # Date 1384188856 -3600 # Node ID c61d1f1bbee0cdb39727ec0d275ee57909d7205c # Parent d36c398299438df866692c50e5adfe88af96497e Invalidate cached nodes after canonicalization in full unrolling. diff -r d36c39829943 -r c61d1f1bbee0 graal/com.oracle.graal.loop/src/com/oracle/graal/loop/LoopEx.java --- a/graal/com.oracle.graal.loop/src/com/oracle/graal/loop/LoopEx.java Mon Nov 11 17:49:41 2013 +0100 +++ b/graal/com.oracle.graal.loop/src/com/oracle/graal/loop/LoopEx.java Mon Nov 11 17:54:16 2013 +0100 @@ -64,6 +64,11 @@ return whole; } + public void invalidateFragments() { + inside = null; + whole = null; + } + @SuppressWarnings("unused") public LoopFragmentInsideFrom insideFrom(FixedNode point) { // TODO (gd) diff -r d36c39829943 -r c61d1f1bbee0 graal/com.oracle.graal.loop/src/com/oracle/graal/loop/LoopFragment.java --- a/graal/com.oracle.graal.loop/src/com/oracle/graal/loop/LoopFragment.java Mon Nov 11 17:49:41 2013 +0100 +++ b/graal/com.oracle.graal.loop/src/com/oracle/graal/loop/LoopFragment.java Mon Nov 11 17:54:16 2013 +0100 @@ -151,6 +151,10 @@ protected static NodeBitMap computeNodes(Graph graph, Iterable blocks, Iterable earlyExits) { final NodeBitMap nodes = graph.createNodeBitMap(true); for (AbstractBeginNode b : blocks) { + if (b.isDeleted()) { + continue; + } + for (Node n : b.getBlockNodes()) { if (n instanceof Invoke) { nodes.mark(((Invoke) n).callTarget()); @@ -165,6 +169,10 @@ } } for (AbstractBeginNode earlyExit : earlyExits) { + if (earlyExit.isDeleted()) { + continue; + } + FrameState stateAfter = earlyExit.stateAfter(); if (stateAfter != null) { nodes.mark(stateAfter); @@ -184,6 +192,10 @@ final NodeBitMap notloopNodes = graph.createNodeBitMap(true); for (AbstractBeginNode b : blocks) { + if (b.isDeleted()) { + continue; + } + for (Node n : b.getBlockNodes()) { if (n instanceof CommitAllocationNode) { for (VirtualObjectNode obj : ((CommitAllocationNode) n).getVirtualObjects()) { diff -r d36c39829943 -r c61d1f1bbee0 graal/com.oracle.graal.loop/src/com/oracle/graal/loop/LoopTransformations.java --- a/graal/com.oracle.graal.loop/src/com/oracle/graal/loop/LoopTransformations.java Mon Nov 11 17:49:41 2013 +0100 +++ b/graal/com.oracle.graal.loop/src/com/oracle/graal/loop/LoopTransformations.java Mon Nov 11 17:54:16 2013 +0100 @@ -25,8 +25,8 @@ import static com.oracle.graal.phases.GraalOptions.*; import com.oracle.graal.api.code.*; +import com.oracle.graal.graph.Graph.Mark; import com.oracle.graal.graph.*; -import com.oracle.graal.graph.Graph.Mark; import com.oracle.graal.graph.NodeClass.NodeClassIterator; import com.oracle.graal.graph.NodeClass.Position; import com.oracle.graal.nodes.*; @@ -63,6 +63,7 @@ Mark mark = graph.getMark(); peel(loop); canonicalizer.applyIncremental(graph, context, mark); + loop.invalidateFragments(); if (iterations++ > UNROLL_LIMIT || graph.getNodeCount() > MaximumDesiredSize.getValue() * 3) { throw new BailoutException("FullUnroll : Graph seems to grow out of proportion"); }