Mercurial > hg > truffle
diff graal/com.oracle.graal.nodes/src/com/oracle/graal/nodes/util/GraphUtil.java @ 19543:353669a84287
Utilities Node#acceptInputs and Node#acceptSuccessors.
author | Thomas Wuerthinger <thomas.wuerthinger@oracle.com> |
---|---|
date | Sun, 22 Feb 2015 23:44:37 +0100 |
parents | f98e2f0c35d8 |
children | 10a0f4aef97c |
line wrap: on
line diff
--- a/graal/com.oracle.graal.nodes/src/com/oracle/graal/nodes/util/GraphUtil.java Sun Feb 22 23:12:31 2015 +0100 +++ b/graal/com.oracle.graal.nodes/src/com/oracle/graal/nodes/util/GraphUtil.java Sun Feb 22 23:44:37 2015 +0100 @@ -49,7 +49,7 @@ // We reached a control flow end. AbstractEndNode end = (AbstractEndNode) node; killEnd(end, tool); - } else { + } else if (node instanceof FixedNode) { // Normal control flow node. /* * We do not take a successor snapshot because this iterator supports concurrent @@ -116,11 +116,11 @@ if (node != null && node.isAlive()) { node.unsafeDelete(); - for (Node in : node.inputs()) { + node.acceptInputs(in -> { if (in.isAlive() && in.hasNoUsages() && !(in instanceof FixedNode)) { killWithUnusedFloatingInputs(in); } - } + }); ArrayList<Node> usageToKill = null; for (Node usage : node.usages()) {