changeset 21189:a74a22532c17

PhiResolver: use SpillMoveFactory to create moves.
author Josef Eisl <josef.eisl@jku.at>
date Mon, 20 Apr 2015 15:34:41 +0200
parents 2acf1d23d3af
children c927a05097ae
files graal/com.oracle.graal.lir/src/com/oracle/graal/lir/gen/PhiResolver.java
diffstat 1 files changed, 6 insertions(+), 1 deletions(-) [+]
line wrap: on
line diff
--- 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