Mercurial > hg > graal-compiler
changeset 14056:829dacd23dc3
Direct LIR generation: make compileBytecodeToLIR static.
author | Josef Eisl <josef.eisl@jku.at> |
---|---|
date | Wed, 05 Mar 2014 10:13:05 +0100 |
parents | 89bbedfe0ad3 |
children | fe8d6e12c75e |
files | graal/com.oracle.graal.compiler.test/src/com/oracle/graal/compiler/test/GraalCompilerTest.java |
diffstat | 1 files changed, 8 insertions(+), 7 deletions(-) [+] |
line wrap: on
line diff
--- a/graal/com.oracle.graal.compiler.test/src/com/oracle/graal/compiler/test/GraalCompilerTest.java Wed Mar 05 10:12:35 2014 +0100 +++ b/graal/com.oracle.graal.compiler.test/src/com/oracle/graal/compiler/test/GraalCompilerTest.java Wed Mar 05 10:13:05 2014 +0100 @@ -501,7 +501,9 @@ private CompilationResult compileBaseline(ResolvedJavaMethod javaMethod) { try (Scope bds = Debug.scope("compileBaseline")) { Assumptions assumptions = new Assumptions(OptAssumptions.getValue()); - LIRGenerator lirGen = compileBytecodeToLIR(javaMethod, assumptions); + LIRGenerator lirGen = compileBytecodeToLIR(javaMethod, assumptions, getCustomLIRBuilderSuite(GraphBuilderConfiguration.getDefault()), getProviders(), getCodeCache().getTarget(), + getBackend(), getCallingConvention(getCodeCache(), Type.JavaCallee, javaMethod, false), getSpeculationLog(), getSuites()); + CompilationResult compilationResult = new CompilationResult(); try (Scope s = Debug.scope("CodeGen", lirGen)) { // there will be no more GraphIds so we can pass an empty array... @@ -516,24 +518,23 @@ } } - private LIRGenerator compileBytecodeToLIR(ResolvedJavaMethod javaMethod, Assumptions assumptions) { + private static LIRGenerator compileBytecodeToLIR(ResolvedJavaMethod javaMethod, Assumptions assumptions, PhaseSuite<HighTierContext> graphBuilderSuite, Providers providers, + TargetDescription target, Backend backend, CallingConvention cc, SpeculationLog speculationLog, Suites suites) { StructuredGraph graph = new StructuredGraph(javaMethod); - PhaseSuite<HighTierContext> graphBuilderSuite = getCustomLIRBuilderSuite(GraphBuilderConfiguration.getDefault()); graphBuilderSuite.apply(graph, new HighTierContext(providers, null, null, graphBuilderSuite, OptimisticOptimizations.ALL)); Debug.dump(graph, "after bytecode parsing"); - CallingConvention cc = getCallingConvention(getCodeCache(), Type.JavaCallee, graph.method(), false); - TargetDescription target = getCodeCache().getTarget(); assert !graph.isFrozen(); LIR lir = null; try (Scope s = Debug.scope("FrontEnd")) { - lir = emitHIR(getProviders(), target, graph, assumptions, null, getDefaultGraphBuilderSuite(), OptimisticOptimizations.ALL, getProfilingInfo(graph), getSpeculationLog(), getSuites()); + // graphBuilderSuite was getDefaultGraphBuilderSuite() + lir = emitHIR(providers, target, graph, assumptions, null, graphBuilderSuite, OptimisticOptimizations.ALL, getProfilingInfo(graph), speculationLog, suites); } catch (Throwable e) { throw Debug.handle(e); } try (Scope s = Debug.scope("BackEnd", lir)) { - return emitLIR(getBackend(), target, lir, graph, cc); + return emitLIR(backend, target, lir, graph, cc); } catch (Throwable e) { throw Debug.handle(e); }