Mercurial > hg > truffle
changeset 9614:59ec6eb8612e
removed LinearScan.method field
author | Doug Simon <doug.simon@oracle.com> |
---|---|
date | Wed, 08 May 2013 12:19:31 +0200 |
parents | 0c17815817a4 |
children | 1089d63ef168 |
files | graal/com.oracle.graal.compiler.test/src/com/oracle/graal/compiler/test/backend/AllocatorTest.java graal/com.oracle.graal.compiler/src/com/oracle/graal/compiler/GraalCompiler.java graal/com.oracle.graal.compiler/src/com/oracle/graal/compiler/alloc/LinearScan.java graal/com.oracle.graal.compiler/src/com/oracle/graal/compiler/gen/LIRGenerator.java |
diffstat | 4 files changed, 10 insertions(+), 8 deletions(-) [+] |
line wrap: on
line diff
--- a/graal/com.oracle.graal.compiler.test/src/com/oracle/graal/compiler/test/backend/AllocatorTest.java Wed May 08 12:14:03 2013 +0200 +++ b/graal/com.oracle.graal.compiler.test/src/com/oracle/graal/compiler/test/backend/AllocatorTest.java Wed May 08 12:19:31 2013 +0200 @@ -127,7 +127,7 @@ @Override public RegisterStats call() { CallingConvention cc = getCallingConvention(runtime, Type.JavaCallee, graph.method(), false); - GraalCompiler.emitLIR(backend, backend.target, lir, graph, graph.method(), cc); + GraalCompiler.emitLIR(backend, backend.target, lir, graph, cc); return new RegisterStats(lir); } });
--- a/graal/com.oracle.graal.compiler/src/com/oracle/graal/compiler/GraalCompiler.java Wed May 08 12:14:03 2013 +0200 +++ b/graal/com.oracle.graal.compiler/src/com/oracle/graal/compiler/GraalCompiler.java Wed May 08 12:19:31 2013 +0200 @@ -68,7 +68,7 @@ final LIRGenerator lirGen = Debug.scope("BackEnd", lir, new Callable<LIRGenerator>() { public LIRGenerator call() { - return emitLIR(backend, target, lir, graph, method, cc); + return emitLIR(backend, target, lir, graph, cc); } }); Debug.scope("CodeGen", lirGen, new Runnable() { @@ -174,7 +174,7 @@ } - public static LIRGenerator emitLIR(Backend backend, final TargetDescription target, final LIR lir, StructuredGraph graph, final ResolvedJavaMethod method, CallingConvention cc) { + public static LIRGenerator emitLIR(Backend backend, final TargetDescription target, final LIR lir, StructuredGraph graph, CallingConvention cc) { final FrameMap frameMap = backend.newFrameMap(); final LIRGenerator lirGen = backend.newLIRGenerator(graph, frameMap, cc, lir); @@ -205,7 +205,7 @@ Debug.scope("Allocator", new Runnable() { public void run() { - new LinearScan(target, method, lir, lirGen, frameMap).allocate(); + new LinearScan(target, lir, lirGen, frameMap).allocate(); } }); return lirGen;
--- a/graal/com.oracle.graal.compiler/src/com/oracle/graal/compiler/alloc/LinearScan.java Wed May 08 12:14:03 2013 +0200 +++ b/graal/com.oracle.graal.compiler/src/com/oracle/graal/compiler/alloc/LinearScan.java Wed May 08 12:19:31 2013 +0200 @@ -56,7 +56,6 @@ public final class LinearScan { final TargetDescription target; - final JavaMethod method; final LIR ir; final LIRGenerator gen; final FrameMap frameMap; @@ -156,9 +155,8 @@ */ private final int firstVariableNumber; - public LinearScan(TargetDescription target, ResolvedJavaMethod method, LIR ir, LIRGenerator gen, FrameMap frameMap) { + public LinearScan(TargetDescription target, LIR ir, LIRGenerator gen, FrameMap frameMap) { this.target = target; - this.method = method; this.ir = ir; this.gen = gen; this.frameMap = frameMap; @@ -884,7 +882,7 @@ } private void reportFailure(int numBlocks) { - TTY.println(method.toString()); + TTY.println(gen.getGraph().toString()); TTY.println("Error: liveIn set of first block must be empty (when this fails, variables are used before they are defined)"); TTY.print("affected registers:"); TTY.println(blockData.get(ir.cfg.getStartBlock()).liveIn.toString());
--- a/graal/com.oracle.graal.compiler/src/com/oracle/graal/compiler/gen/LIRGenerator.java Wed May 08 12:14:03 2013 +0200 +++ b/graal/com.oracle.graal.compiler/src/com/oracle/graal/compiler/gen/LIRGenerator.java Wed May 08 12:19:31 2013 +0200 @@ -118,6 +118,10 @@ return runtime; } + public StructuredGraph getGraph() { + return graph; + } + /** * Returns the operand that has been previously initialized by * {@link #setResult(ValueNode, Value)} with the result of an instruction.