# HG changeset patch # User Doug Simon # Date 1368008371 -7200 # Node ID 59ec6eb8612ee5bb2a92f333db31394265f343a9 # Parent 0c17815817a4aae4d0be2d80c84045557f6be4f2 removed LinearScan.method field diff -r 0c17815817a4 -r 59ec6eb8612e graal/com.oracle.graal.compiler.test/src/com/oracle/graal/compiler/test/backend/AllocatorTest.java --- 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); } }); diff -r 0c17815817a4 -r 59ec6eb8612e graal/com.oracle.graal.compiler/src/com/oracle/graal/compiler/GraalCompiler.java --- 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() { 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; diff -r 0c17815817a4 -r 59ec6eb8612e graal/com.oracle.graal.compiler/src/com/oracle/graal/compiler/alloc/LinearScan.java --- 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()); diff -r 0c17815817a4 -r 59ec6eb8612e graal/com.oracle.graal.compiler/src/com/oracle/graal/compiler/gen/LIRGenerator.java --- 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.