Mercurial > hg > truffle
diff graal/com.oracle.graal.phases.common/src/com/oracle/graal/phases/common/ConditionalEliminationPhase.java @ 15001:27c04ee36dcb
input types
author | Lukas Stadler <lukas.stadler@oracle.com> |
---|---|
date | Mon, 07 Apr 2014 11:32:04 +0200 |
parents | e302df8bf51c |
children | e49f62425090 |
line wrap: on
line diff
--- a/graal/com.oracle.graal.phases.common/src/com/oracle/graal/phases/common/ConditionalEliminationPhase.java Mon Apr 07 16:24:49 2014 +0200 +++ b/graal/com.oracle.graal.phases.common/src/com/oracle/graal/phases/common/ConditionalEliminationPhase.java Mon Apr 07 11:32:04 2014 +0200 @@ -707,11 +707,7 @@ if (nonNull) { replacementAnchor = searchAnchor(GraphUtil.unproxify(object), type); } - ValueAnchorNode anchor = null; - if (replacementAnchor == null) { - anchor = graph.add(new ValueAnchorNode(null)); - replacementAnchor = anchor; - } + replacementAnchor = BeginNode.prevBegin(checkCast); PiNode piNode; if (isNull) { ConstantNode nullObject = ConstantNode.forObject(null, metaAccess, graph); @@ -720,11 +716,7 @@ piNode = graph.unique(new PiNode(object, StampFactory.declared(type, nonNull), replacementAnchor.asNode())); } checkCast.replaceAtUsages(piNode); - if (anchor != null) { - graph.replaceFixedWithFixed(checkCast, anchor); - } else { - graph.removeFixed(checkCast); - } + graph.removeFixed(checkCast); metricCheckCastRemoved.increment(); } } else if (node instanceof ConditionAnchorNode) {