aboutsummaryrefslogtreecommitdiff
path: root/lib/CodeGen/LiveIntervalAnalysis.cpp
diff options
context:
space:
mode:
authorAlkis Evlogimenos <alkis@evlogimenos.com>2004-02-17 04:04:20 +0000
committerAlkis Evlogimenos <alkis@evlogimenos.com>2004-02-17 04:04:20 +0000
commit355a724bd8366b982950ac913b0589d40eaf379b (patch)
tree5bc00320816f69910a954ed12adea769a49cb521 /lib/CodeGen/LiveIntervalAnalysis.cpp
parent42e0a8fded2c22b45a351afb88bf7ee233d61258 (diff)
Fix spilled interval update. It was too conservative.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@11516 91177308-0d34-0410-b5e6-96231b3b80d8
Diffstat (limited to 'lib/CodeGen/LiveIntervalAnalysis.cpp')
-rw-r--r--lib/CodeGen/LiveIntervalAnalysis.cpp5
1 files changed, 4 insertions, 1 deletions
diff --git a/lib/CodeGen/LiveIntervalAnalysis.cpp b/lib/CodeGen/LiveIntervalAnalysis.cpp
index f602658d17..64925b40bd 100644
--- a/lib/CodeGen/LiveIntervalAnalysis.cpp
+++ b/lib/CodeGen/LiveIntervalAnalysis.cpp
@@ -191,7 +191,10 @@ void LiveIntervals::updateSpilledInterval(Interval& li)
if (mop.isRegister()) {
unsigned reg = mop.getReg();
if (rep(reg) == li.reg) {
- li.addRange(index, index + 2);
+ if (mop.isUse())
+ li.addRange(index, index+2);
+ else
+ li.addRange(index+1, index+2);
}
}
}