Mercurial > hg > truffle
changeset 18522:2fa2460f99b3
Merge.
author | Doug Simon <doug.simon@oracle.com> |
---|---|
date | Wed, 26 Nov 2014 10:26:24 +0100 |
parents | 41208d675d3d (current diff) a21a4039ce7b (diff) |
children | 57880e95102e |
files | |
diffstat | 4 files changed, 13 insertions(+), 5 deletions(-) [+] |
line wrap: on
line diff
--- 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;
--- 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;
--- 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) {
--- 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++) {