changeset 19225:e20a4aab49ad

GraalCompiler.emitLowLevel: pass LowLevelCompilerConfiguration as parameter.
author Josef Eisl <josef.eisl@jku.at>
date Mon, 09 Feb 2015 14:19:03 +0100
parents 0ea5aa5f6b2e
children 9c47b23fb0a2
files graal/com.oracle.graal.baseline/src/com/oracle/graal/baseline/BaselineBytecodeParser.java graal/com.oracle.graal.compiler/src/com/oracle/graal/compiler/GraalCompiler.java
diffstat 2 files changed, 7 insertions(+), 5 deletions(-) [+]
line wrap: on
line diff
--- a/graal/com.oracle.graal.baseline/src/com/oracle/graal/baseline/BaselineBytecodeParser.java	Mon Feb 09 13:39:11 2015 +0100
+++ b/graal/com.oracle.graal.baseline/src/com/oracle/graal/baseline/BaselineBytecodeParser.java	Mon Feb 09 14:19:03 2015 +0100
@@ -43,6 +43,7 @@
 import com.oracle.graal.lir.StandardOp.BlockEndOp;
 import com.oracle.graal.lir.framemap.*;
 import com.oracle.graal.lir.gen.*;
+import com.oracle.graal.lir.phases.*;
 import com.oracle.graal.phases.*;
 
 public class BaselineBytecodeParser extends AbstractBytecodeParser<Value, BaselineFrameStateBuilder> implements BytecodeParserTool {
@@ -145,7 +146,8 @@
                 }
 
                 try (Scope s = Debug.scope("LowLevelTier", this)) {
-                    return GraalCompiler.emitLowLevel(backend, target, codeEmittingOrder, linearScanOrder, lirGenRes, gen);
+                    LowLevelCompilerConfiguration config = backend.getLowLevelCompilerConfiguration();
+                    return GraalCompiler.emitLowLevel(target, codeEmittingOrder, linearScanOrder, lirGenRes, gen, config);
                 } catch (Throwable e) {
                     throw Debug.handle(e);
                 }
--- a/graal/com.oracle.graal.compiler/src/com/oracle/graal/compiler/GraalCompiler.java	Mon Feb 09 13:39:11 2015 +0100
+++ b/graal/com.oracle.graal.compiler/src/com/oracle/graal/compiler/GraalCompiler.java	Mon Feb 09 14:19:03 2015 +0100
@@ -335,7 +335,8 @@
             }
 
             try (Scope s = Debug.scope("LowLevelTier", nodeLirGen)) {
-                return emitLowLevel(backend, target, codeEmittingOrder, linearScanOrder, lirGenRes, lirGen);
+                LowLevelCompilerConfiguration config = backend.getLowLevelCompilerConfiguration();
+                return emitLowLevel(target, codeEmittingOrder, linearScanOrder, lirGenRes, lirGen, config);
             } catch (Throwable e) {
                 throw Debug.handle(e);
             }
@@ -344,9 +345,8 @@
         }
     }
 
-    public static <T extends AbstractBlock<T>> LIRGenerationResult emitLowLevel(Backend backend, TargetDescription target, List<T> codeEmittingOrder, List<T> linearScanOrder,
-                    LIRGenerationResult lirGenRes, LIRGeneratorTool lirGen) {
-        LowLevelCompilerConfiguration config = backend.getLowLevelCompilerConfiguration();
+    public static <T extends AbstractBlock<T>> LIRGenerationResult emitLowLevel(TargetDescription target, List<T> codeEmittingOrder, List<T> linearScanOrder, LIRGenerationResult lirGenRes,
+                    LIRGeneratorTool lirGen, LowLevelCompilerConfiguration config) {
         try (Scope s0 = Debug.scope("LowLevelHighTier")) {
             LowLevelHighTierPhase.Context c = new LowLevelHighTierPhase.Context(lirGen);
             config.<T> createHighTier().apply(target, lirGenRes, codeEmittingOrder, linearScanOrder, c);