# HG changeset patch # User Josef Eisl # Date 1404306265 -7200 # Node ID 8057279ec60e0e1dfb5fc0ebf0e7bbeae5d5f2e1 # Parent c5257d58b71af3786c19475429a765cd9b40dfd6 LSRA spill optimization: use DOMINATOR_SPILL_MOVE_ID to mark moves. diff -r c5257d58b71a -r 8057279ec60e 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 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. diff -r c5257d58b71a -r 8057279ec60e graal/com.oracle.graal.compiler/src/com/oracle/graal/compiler/alloc/RegisterVerifier.java --- 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 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);