# HG changeset patch # User Doug Simon # Date 1416993984 -3600 # Node ID 2fa2460f99b38aa36bef30a1dee5c155a430cc97 # Parent 41208d675d3dc70bfb3fc10d8a97688e65487ded# Parent a21a4039ce7bd6708657a7f50ef8907e2fc75fce Merge. diff -r 41208d675d3d -r 2fa2460f99b3 graal/com.oracle.graal.api.code/src/com/oracle/graal/api/code/StackSlotValue.java --- a/graal/com.oracle.graal.api.code/src/com/oracle/graal/api/code/StackSlotValue.java Wed Nov 26 10:02:49 2014 +0100 +++ b/graal/com.oracle.graal.api.code/src/com/oracle/graal/api/code/StackSlotValue.java Wed Nov 26 10:26:24 2014 +0100 @@ -24,6 +24,10 @@ import com.oracle.graal.api.meta.*; +/** + * Common base class for {@linkplain StackSlot real} and {@linkplain VirtualStackSlot virtual} stack + * slots. + */ public abstract class StackSlotValue extends AllocatableValue { private static final long serialVersionUID = 5106407801795483337L; diff -r 41208d675d3d -r 2fa2460f99b3 graal/com.oracle.graal.api.code/src/com/oracle/graal/api/code/VirtualStackSlot.java --- a/graal/com.oracle.graal.api.code/src/com/oracle/graal/api/code/VirtualStackSlot.java Wed Nov 26 10:02:49 2014 +0100 +++ b/graal/com.oracle.graal.api.code/src/com/oracle/graal/api/code/VirtualStackSlot.java Wed Nov 26 10:26:24 2014 +0100 @@ -24,6 +24,10 @@ import com.oracle.graal.api.meta.*; +/** + * {@link VirtualStackSlot}s are stack slots that are not yet fixed to specific frame offset. They + * are replaced by real {@link StackSlot}s with a fixed position in the frame before code emission. + */ public abstract class VirtualStackSlot extends StackSlotValue { private static final long serialVersionUID = 2823688688873398219L; diff -r 41208d675d3d -r 2fa2460f99b3 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 10:02:49 2014 +0100 +++ b/graal/com.oracle.graal.compiler/src/com/oracle/graal/compiler/alloc/LinearScan.java Wed Nov 26 10:26:24 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 41208d675d3d -r 2fa2460f99b3 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 10:02:49 2014 +0100 +++ b/graal/com.oracle.graal.compiler/src/com/oracle/graal/compiler/alloc/LinearScanWalker.java Wed Nov 26 10:26:24 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++) {