# HG changeset patch # User Josef Eisl # Date 1430824085 -7200 # Node ID 7e9edc108b3543c268d6264c43efc76050a3f745 # Parent 4e5fe228f6298f1a13184b70111f96af8b11ebae NodeLIRBuilder: use AbstractMergeNode#valuePhis. diff -r 4e5fe228f629 -r 7e9edc108b35 graal/com.oracle.graal.compiler/src/com/oracle/graal/compiler/gen/NodeLIRBuilder.java --- a/graal/com.oracle.graal.compiler/src/com/oracle/graal/compiler/gen/NodeLIRBuilder.java Tue May 05 13:07:06 2015 +0200 +++ b/graal/com.oracle.graal.compiler/src/com/oracle/graal/compiler/gen/NodeLIRBuilder.java Tue May 05 13:08:05 2015 +0200 @@ -40,7 +40,6 @@ import com.oracle.graal.debug.*; import com.oracle.graal.debug.Debug.Scope; import com.oracle.graal.graph.*; -import com.oracle.graal.graph.iterators.*; import com.oracle.graal.lir.*; import com.oracle.graal.lir.StandardOp.JumpOp; import com.oracle.graal.lir.StandardOp.LabelOp; @@ -194,10 +193,6 @@ gen.append(op); } - private static NodeIterable valuePhis(AbstractMergeNode merge) { - return merge.usages().filter(ValuePhiNode.class).filter(merge::isPhiAtMerge); - } - protected LIRKind getExactPhiKind(PhiNode phi) { ArrayList values = new ArrayList<>(phi.valueCount()); for (int i = 0; i < phi.valueCount(); i++) { @@ -223,7 +218,7 @@ private Value[] createPhiIn(AbstractMergeNode merge) { List values = new ArrayList<>(); - for (ValuePhiNode phi : valuePhis(merge)) { + for (ValuePhiNode phi : merge.valuePhis()) { assert getOperand(phi) == null; Variable value = gen.newVariable(getExactPhiKind(phi)); values.add(value); @@ -234,7 +229,7 @@ private Value[] createPhiOut(AbstractMergeNode merge, AbstractEndNode pred) { List values = new ArrayList<>(); - for (PhiNode phi : valuePhis(merge)) { + for (PhiNode phi : merge.valuePhis()) { Value value = operand(phi.valueAt(pred)); assert value != null; values.add(value);