Mercurial > hg > truffle
changeset 16380:8057279ec60e
LSRA spill optimization: use DOMINATOR_SPILL_MOVE_ID to mark moves.
author | Josef Eisl <josef.eisl@jku.at> |
---|---|
date | Wed, 02 Jul 2014 15:04:25 +0200 |
parents | c5257d58b71a |
children | c68c5fafef92 |
files | graal/com.oracle.graal.compiler/src/com/oracle/graal/compiler/alloc/LinearScan.java graal/com.oracle.graal.compiler/src/com/oracle/graal/compiler/alloc/RegisterVerifier.java |
diffstat | 2 files changed, 4 insertions(+), 3 deletions(-) [+] |
line wrap: on
line diff
--- a/graal/com.oracle.graal.compiler/src/com/oracle/graal/compiler/alloc/LinearScan.java Wed Jul 02 13:52:25 2014 +0200 +++ b/graal/com.oracle.graal.compiler/src/com/oracle/graal/compiler/alloc/LinearScan.java Wed Jul 02 15:04:25 2014 +0200 @@ -68,6 +68,7 @@ boolean callKillsRegisters; + public static final int DOMINATOR_SPILL_MOVE_ID = -2; private static final int SPLIT_INTERVALS_CAPACITY_RIGHT_SHIFT = 1; public static class Options { @@ -2002,7 +2003,7 @@ AllocatableValue fromLocation = interval.getSplitChildAtOpId(spillOpId, OperandMode.DEF, this).location(); AllocatableValue toLocation = canonicalSpillOpr(interval); LIRInstruction move = ir.getSpillMoveFactory().createMove(toLocation, fromLocation); - move.setId(-2); + move.setId(DOMINATOR_SPILL_MOVE_ID); /* * We can use the insertion buffer directly because we always insert * at position 1.
--- a/graal/com.oracle.graal.compiler/src/com/oracle/graal/compiler/alloc/RegisterVerifier.java Wed Jul 02 13:52:25 2014 +0200 +++ b/graal/com.oracle.graal.compiler/src/com/oracle/graal/compiler/alloc/RegisterVerifier.java Wed Jul 02 15:04:25 2014 +0200 @@ -191,8 +191,8 @@ @Override public Value doValue(LIRInstruction op, Value operand, OperandMode mode, EnumSet<OperandFlag> flags) { - // op.id() == -2 are spill moves inserted by the spill position optimization - if (LinearScan.isVariableOrRegister(operand) && allocator.isProcessed(operand) && op.id() != -2) { + // we skip spill moves inserted by the spill position optimization + if (LinearScan.isVariableOrRegister(operand) && allocator.isProcessed(operand) && op.id() != LinearScan.DOMINATOR_SPILL_MOVE_ID) { Interval interval = intervalAt(operand); if (op.id() != -1) { interval = interval.getSplitChildAtOpId(op.id(), mode, allocator);