# HG changeset patch # User Christian Wimmer # Date 1410918004 25200 # Node ID 7a0bff31df98cd1ed8adcf78ce19e77f78342437 # Parent ce1b6453c544ebce6044ae15c4985a53515d8c9e Encapsulate creation of LinearScan object diff -r ce1b6453c544 -r 7a0bff31df98 graal/com.oracle.graal.baseline/src/com/oracle/graal/baseline/BaselineBytecodeParser.java --- a/graal/com.oracle.graal.baseline/src/com/oracle/graal/baseline/BaselineBytecodeParser.java Tue Sep 16 18:36:59 2014 -0700 +++ b/graal/com.oracle.graal.baseline/src/com/oracle/graal/baseline/BaselineBytecodeParser.java Tue Sep 16 18:40:04 2014 -0700 @@ -158,7 +158,7 @@ try (Scope s = Debug.scope("Allocator")) { if (backend.shouldAllocateRegisters()) { - new LinearScan(target, lir, frameMap).allocate(); + GraalCompiler.runLinearScan(target, lir, frameMap); } } catch (Throwable e) { throw Debug.handle(e); diff -r ce1b6453c544 -r 7a0bff31df98 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 Tue Sep 16 18:36:59 2014 -0700 +++ b/graal/com.oracle.graal.compiler/src/com/oracle/graal/compiler/GraalCompiler.java Tue Sep 16 18:40:04 2014 -0700 @@ -269,7 +269,7 @@ try (Scope s = Debug.scope("Allocator", nodeLirGen)) { if (backend.shouldAllocateRegisters()) { - new LinearScan(target, lir, frameMap).allocate(); + LinearScan.allocate(target, lir, frameMap); } } catch (Throwable e) { throw Debug.handle(e); diff -r ce1b6453c544 -r 7a0bff31df98 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 Tue Sep 16 18:36:59 2014 -0700 +++ b/graal/com.oracle.graal.compiler/src/com/oracle/graal/compiler/alloc/LinearScan.java Tue Sep 16 18:40:04 2014 -0700 @@ -1856,7 +1856,11 @@ } } - public void allocate() { + public static void allocate(TargetDescription target, LIR lir, FrameMap frameMap) { + new LinearScan(target, lir, frameMap).allocate(); + } + + private void allocate() { /* * This is the point to enable debug logging for the whole register allocation.