# HG changeset patch # User Josef Eisl # Date 1416925420 -3600 # Node ID bcf66634c55c1dcde01e0f5072c999c1fb2d0651 # Parent 62aac33db66946bbfb2aa266b6209427eb6f97d9 Make LinearScan.callKillsRegisters final. diff -r 62aac33db669 -r bcf66634c55c 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 Nov 26 01:06:38 2014 +0100 +++ b/graal/com.oracle.graal.compiler/src/com/oracle/graal/compiler/alloc/LinearScan.java Tue Nov 25 15:23:40 2014 +0100 @@ -66,7 +66,7 @@ final RegisterAttributes[] registerAttributes; final Register[] registers; - boolean callKillsRegisters; + final boolean callKillsRegisters; public static final int DOMINATOR_SPILL_MOVE_ID = -2; private static final int SPLIT_INTERVALS_CAPACITY_RIGHT_SHIFT = 1; @@ -173,6 +173,10 @@ this.registers = target.arch.getRegisters(); this.firstVariableNumber = registers.length; this.blockData = new BlockMap<>(ir.getControlFlowGraph()); + + // If all allocatable registers are caller saved, then no registers are live across a call + // site. The register allocator can save time not trying to find a register at a call site. + this.callKillsRegisters = this.frameMapBuilder.getRegisterConfig().areAllAllocatableRegistersCallerSaved(); } public int getFirstLirInstructionId(AbstractBlock block) { diff -r 62aac33db669 -r bcf66634c55c graal/com.oracle.graal.compiler/src/com/oracle/graal/compiler/alloc/LinearScanWalker.java --- a/graal/com.oracle.graal.compiler/src/com/oracle/graal/compiler/alloc/LinearScanWalker.java Wed Nov 26 01:06:38 2014 +0100 +++ b/graal/com.oracle.graal.compiler/src/com/oracle/graal/compiler/alloc/LinearScanWalker.java Tue Nov 25 15:23:40 2014 +0100 @@ -77,10 +77,6 @@ LinearScanWalker(LinearScan allocator, Interval unhandledFixedFirst, Interval unhandledAnyFirst) { super(allocator, unhandledFixedFirst, unhandledAnyFirst); - // If all allocatable registers are caller saved, then no registers are live across a call - // site. The register allocator can save time not trying to find a register at a call site. - allocator.callKillsRegisters = allocator.frameMapBuilder.getRegisterConfig().areAllAllocatableRegistersCallerSaved(); - moveResolver = new MoveResolver(allocator); spillIntervals = Util.uncheckedCast(new List[allocator.registers.length]); for (int i = 0; i < allocator.registers.length; i++) {