# HG changeset patch # User twisti # Date 1375640776 25200 # Node ID d0c9278fe4716afb77f85da199f01fcb67cd66b8 # Parent 8aba11322f4ea74d30716e9bcc866e97acb2ad5a move callKillsRegisters to LinearScan diff -r 8aba11322f4e -r d0c9278fe471 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 Sun Aug 04 11:24:55 2013 -0700 +++ b/graal/com.oracle.graal.compiler/src/com/oracle/graal/compiler/alloc/LinearScan.java Sun Aug 04 11:26:16 2013 -0700 @@ -63,6 +63,8 @@ final RegisterAttributes[] registerAttributes; final Register[] registers; + boolean callKillsRegisters; + private static final int INITIAL_SPLIT_INTERVALS_CAPACITY = 32; public static class BlockData { @@ -1702,7 +1704,7 @@ } private void computeDebugInfo(IntervalWalker iw, final LIRInstruction op, LIRFrameState info) { - BitSet registerRefMap = op.destroysCallerSavedRegisters() ? null : frameMap.initRegisterRefMap(); + BitSet registerRefMap = op.destroysCallerSavedRegisters() && callKillsRegisters ? null : frameMap.initRegisterRefMap(); BitSet frameRefMap = frameMap.initFrameRefMap(); computeOopMap(iw, op, registerRefMap, frameRefMap); diff -r 8aba11322f4e -r d0c9278fe471 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 Sun Aug 04 11:24:55 2013 -0700 +++ b/graal/com.oracle.graal.compiler/src/com/oracle/graal/compiler/alloc/LinearScanWalker.java Sun Aug 04 11:26:16 2013 -0700 @@ -45,8 +45,6 @@ */ final class LinearScanWalker extends IntervalWalker { - private final boolean callKillsRegisters; - private Register[] availableRegs; private final int[] usePos; @@ -77,7 +75,7 @@ // The register allocator can save time not trying to find a register at a call site. HashSet registers = new HashSet<>(Arrays.asList(allocator.frameMap.registerConfig.getAllocatableRegisters())); registers.removeAll(Arrays.asList(allocator.frameMap.registerConfig.getCallerSaveRegisters())); - callKillsRegisters = registers.size() == 0; + allocator.callKillsRegisters = registers.size() == 0; moveResolver = new MoveResolver(allocator); spillIntervals = Util.uncheckedCast(new List[allocator.registers.length]); @@ -784,8 +782,7 @@ } boolean noAllocationPossible(Interval interval) { - - if (callKillsRegisters) { + if (allocator.callKillsRegisters) { // fast calculation of intervals that can never get a register because the // the next instruction is a call that blocks all registers // Note: this only works if a call kills all registers