Fix overly conservative spill interval computation.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@11574 91177308-0d34-0410-b5e6-96231b3b80d8
This commit is contained in:
Alkis Evlogimenos 2004-02-18 03:35:38 +00:00
parent 3a9986f5d8
commit 99d9923608

View File

@ -191,10 +191,9 @@ void LiveIntervals::updateSpilledInterval(Interval& li)
if (mop.isRegister()) { if (mop.isRegister()) {
unsigned reg = mop.getReg(); unsigned reg = mop.getReg();
if (rep(reg) == li.reg) { if (rep(reg) == li.reg) {
if (mop.isUse()) unsigned start = mop.isUse() ? index : index+1;
li.addRange(index, index+2); unsigned end = mop.isDef() ? index+2 : index+1;
else li.addRange(start, end);
li.addRange(index+1, index+2);
} }
} }
} }