# HG changeset patch # User Lukas Stadler # Date 1403792856 -7200 # Node ID 614d3b9ed188c4e64c1b0a35800a60b36cb9bcdf # Parent a762ddb12b437d90bb971166598f294e39958ccf let CanonicalizerPhase handle replacement with null in GuardNode.canonical diff -r a762ddb12b43 -r 614d3b9ed188 graal/com.oracle.graal.nodes/src/com/oracle/graal/nodes/GuardNode.java --- a/graal/com.oracle.graal.nodes/src/com/oracle/graal/nodes/GuardNode.java Thu Jun 26 16:27:36 2014 +0200 +++ b/graal/com.oracle.graal.nodes/src/com/oracle/graal/nodes/GuardNode.java Thu Jun 26 16:27:36 2014 +0200 @@ -65,11 +65,6 @@ return condition; } - public void setCondition(LogicNode x) { - updateUsages(condition, x); - condition = x; - } - public boolean negated() { return negated; } @@ -103,11 +98,11 @@ public Node canonical(CanonicalizerTool tool) { if (condition() instanceof LogicNegationNode) { LogicNegationNode negation = (LogicNegationNode) condition(); - return graph().unique(new GuardNode(negation.getValue(), getAnchor(), reason, action, !negated, speculation)); - } else if (condition() instanceof LogicConstantNode) { + return new GuardNode(negation.getValue(), getAnchor(), reason, action, !negated, speculation); + } + if (condition() instanceof LogicConstantNode) { LogicConstantNode c = (LogicConstantNode) condition(); if (c.getValue() != negated) { - this.replaceAtUsages(null); return null; } }