diff graal/com.oracle.graal.nodes/src/com/oracle/graal/nodes/LoopBeginNode.java @ 18937:ff232ff8d028

Add utility Node#hasNoUsages.
author Thomas Wuerthinger <thomas.wuerthinger@oracle.com>
date Fri, 23 Jan 2015 11:52:36 +0100
parents f57d86eb036f
children 480bd3b1adcd
line wrap: on
line diff
--- a/graal/com.oracle.graal.nodes/src/com/oracle/graal/nodes/LoopBeginNode.java	Fri Jan 23 11:28:20 2015 +0100
+++ b/graal/com.oracle.graal.nodes/src/com/oracle/graal/nodes/LoopBeginNode.java	Fri Jan 23 11:52:36 2015 +0100
@@ -192,7 +192,7 @@
             loopexit.removeProxies();
             FrameState loopStateAfter = loopexit.stateAfter();
             graph().replaceFixedWithFixed(loopexit, graph().add(new BeginNode()));
-            if (loopStateAfter != null && loopStateAfter.isAlive() && loopStateAfter.usages().isEmpty()) {
+            if (loopStateAfter != null && loopStateAfter.isAlive() && loopStateAfter.hasNoUsages()) {
                 GraphUtil.killWithUnusedFloatingInputs(loopStateAfter);
             }
         }