# HG changeset patch # User Josef Eisl # Date 1429536881 -7200 # Node ID a74a22532c171f4aa2fe4242aba2352a7526216d # Parent 2acf1d23d3af692b09377c0f9eccca3e5645355a PhiResolver: use SpillMoveFactory to create moves. diff -r 2acf1d23d3af -r a74a22532c17 graal/com.oracle.graal.lir/src/com/oracle/graal/lir/gen/PhiResolver.java --- a/graal/com.oracle.graal.lir/src/com/oracle/graal/lir/gen/PhiResolver.java Mon Apr 20 14:24:55 2015 +0200 +++ b/graal/com.oracle.graal.lir/src/com/oracle/graal/lir/gen/PhiResolver.java Mon Apr 20 15:34:41 2015 +0200 @@ -30,6 +30,8 @@ import com.oracle.graal.api.meta.*; import com.oracle.graal.compiler.common.*; +import com.oracle.graal.lir.*; +import com.oracle.graal.lir.gen.LIRGeneratorTool.*; /** * Converts phi instructions into moves. @@ -104,6 +106,7 @@ } private final LIRGeneratorTool gen; + private final SpillMoveFactory moveFactory; /** * The operand loop header phi for the operand currently being process in {@link #dispose()}. @@ -122,6 +125,7 @@ public PhiResolver(LIRGeneratorTool gen) { this.gen = gen; + moveFactory = gen.getSpillMoveFactory(); temp = ILLEGAL; } @@ -187,7 +191,8 @@ private void emitMove(Value dest, Value src) { assert isLegal(src); assert isLegal(dest); - gen.emitMove((AllocatableValue) dest, src); + LIRInstruction move = moveFactory.createMove((AllocatableValue) dest, src); + gen.append(move); } // Traverse assignment graph in depth first order and generate moves in post order