changeset 19583:a148dec4e37b

Fix a regression in the partial escape analysis.
author Thomas Wuerthinger <thomas.wuerthinger@oracle.com>
date Tue, 24 Feb 2015 19:18:52 +0100
parents da62d18a9da0
children 6ccf3993b7f2
files graal/com.oracle.graal.virtual/src/com/oracle/graal/virtual/phases/ea/EffectsClosure.java graal/com.oracle.graal.virtual/src/com/oracle/graal/virtual/phases/ea/GraphEffectList.java
diffstat 2 files changed, 6 insertions(+), 5 deletions(-) [+]
line wrap: on
line diff
--- a/graal/com.oracle.graal.virtual/src/com/oracle/graal/virtual/phases/ea/EffectsClosure.java	Tue Feb 24 15:10:11 2015 +0100
+++ b/graal/com.oracle.graal.virtual/src/com/oracle/graal/virtual/phases/ea/EffectsClosure.java	Tue Feb 24 19:18:52 2015 +0100
@@ -112,10 +112,10 @@
         };
         ReentrantBlockIterator.apply(closure, cfg.getStartBlock());
         assert VirtualUtil.assertNonReachable(graph, obsoleteNodes);
-        for (Node fixed : obsoleteNodes) {
-            if (fixed.isAlive()) {
-                fixed.replaceAtUsages(null);
-                GraphUtil.killWithUnusedFloatingInputs(fixed);
+        for (Node node : obsoleteNodes) {
+            if (node.isAlive()) {
+                node.replaceAtUsages(null);
+                GraphUtil.killWithUnusedFloatingInputs(node);
             }
         }
     }
--- a/graal/com.oracle.graal.virtual/src/com/oracle/graal/virtual/phases/ea/GraphEffectList.java	Tue Feb 24 15:10:11 2015 +0100
+++ b/graal/com.oracle.graal.virtual/src/com/oracle/graal/virtual/phases/ea/GraphEffectList.java	Tue Feb 24 19:18:52 2015 +0100
@@ -160,7 +160,7 @@
             if (node instanceof FixedWithNextNode) {
                 GraphUtil.unlinkFixedNode((FixedWithNextNode) node);
             }
-            GraphUtil.killWithUnusedFloatingInputs(node);
+            obsoleteNodes.add(node);
         });
     }
 
@@ -172,6 +172,7 @@
      * @param newInput The value to replace with.
      */
     public void replaceFirstInput(final Node node, final Node oldInput, final Node newInput) {
+        assert node.isAlive() && oldInput.isAlive() && !newInput.isDeleted();
         add("replace first input", new Effect() {
             @Override
             public void apply(StructuredGraph graph, ArrayList<Node> obsoleteNodes) {