summaryrefslogtreecommitdiff
path: root/lib/CodeGen/RegAllocLinearScan.cpp
diff options
context:
space:
mode:
authorAlkis Evlogimenos <alkis@evlogimenos.com>2004-01-13 20:37:01 +0000
committerAlkis Evlogimenos <alkis@evlogimenos.com>2004-01-13 20:37:01 +0000
commitf7df173e3bf03c0d91adfa695fd9845583fb9d49 (patch)
tree03e71672d56f36c02abebe1f36fd536d1d7e9c8b /lib/CodeGen/RegAllocLinearScan.cpp
parentf9543267413b17efa54f9f0d53be838a69ea2aef (diff)
downloadllvm-f7df173e3bf03c0d91adfa695fd9845583fb9d49.tar.gz
llvm-f7df173e3bf03c0d91adfa695fd9845583fb9d49.tar.bz2
llvm-f7df173e3bf03c0d91adfa695fd9845583fb9d49.tar.xz
Fix bug introduced by previous commit: check if fixed intervals
overlap before adding their spill weight. git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@10819 91177308-0d34-0410-b5e6-96231b3b80d8
Diffstat (limited to 'lib/CodeGen/RegAllocLinearScan.cpp')
-rw-r--r--lib/CodeGen/RegAllocLinearScan.cpp3
1 files changed, 3 insertions, 0 deletions
diff --git a/lib/CodeGen/RegAllocLinearScan.cpp b/lib/CodeGen/RegAllocLinearScan.cpp
index 1116edd39a..616c438f55 100644
--- a/lib/CodeGen/RegAllocLinearScan.cpp
+++ b/lib/CodeGen/RegAllocLinearScan.cpp
@@ -547,6 +547,9 @@ void RA::assignStackSlotAtInterval(IntervalPtrs::value_type cur)
// for each fixed interval that overlaps
for (IntervalPtrs::const_iterator i = fixed_.begin(), e = fixed_.end();
i != e; ++i) {
+ if (!cur->overlaps(**i))
+ continue;
+
assert((*i)->reg < MRegisterInfo::FirstVirtualRegister &&
"virtual register interval in fixed set?");
updateWeight(regWeight, (*i)->reg, (*i)->weight);