Mercurial > hg > graal-compiler
changeset 16367:f0ac7457252a
LSRA spill optimization: use the correct from location for the spill move.
author | Josef Eisl <josef.eisl@jku.at> |
---|---|
date | Wed, 11 Jun 2014 14:49:59 +0200 |
parents | 0abb7a42ef75 |
children | ef641ba1fb69 |
files | graal/com.oracle.graal.compiler/src/com/oracle/graal/compiler/alloc/LinearScan.java |
diffstat | 1 files changed, 3 insertions(+), 1 deletions(-) [+] |
line wrap: on
line diff
--- a/graal/com.oracle.graal.compiler/src/com/oracle/graal/compiler/alloc/LinearScan.java Tue Jun 10 16:43:26 2014 +0200 +++ b/graal/com.oracle.graal.compiler/src/com/oracle/graal/compiler/alloc/LinearScan.java Wed Jun 11 14:49:59 2014 +0200 @@ -606,7 +606,9 @@ insertionBuffer.init(instructions); } - AllocatableValue fromLocation = interval.location(); + // if we spill in a dominator we need to find the right location + AllocatableValue fromLocation = interval.spillState() == SpillState.SpillInDominator ? interval.getSplitChildAtOpId(opId, OperandMode.DEF, this).location() + : interval.location(); AllocatableValue toLocation = canonicalSpillOpr(interval); assert isRegister(fromLocation) : "from operand must be a register but is: " + fromLocation + " toLocation=" + toLocation + " spillState=" + interval.spillState();