summaryrefslogtreecommitdiffstats
path: root/llvm/lib/CodeGen
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
commit6b1ec75da95ed9bec12c8a15b6964c00b23710fb (patch)
treefaf61cef267c5d2d6d0500d7bde2728b9363abfa /llvm/lib/CodeGen
parentdbd9c33e5e6fabba344ea7b9666a46694f890202 (diff)
downloadbcm5719-llvm-6b1ec75da95ed9bec12c8a15b6964c00b23710fb.tar.gz
bcm5719-llvm-6b1ec75da95ed9bec12c8a15b6964c00b23710fb.zip
Fix bug introduced by previous commit: check if fixed intervals
overlap before adding their spill weight. llvm-svn: 10819
Diffstat (limited to 'llvm/lib/CodeGen')
-rw-r--r--llvm/lib/CodeGen/RegAllocLinearScan.cpp3
1 files changed, 3 insertions, 0 deletions
diff --git a/llvm/lib/CodeGen/RegAllocLinearScan.cpp b/llvm/lib/CodeGen/RegAllocLinearScan.cpp
index 1116edd39a5..616c438f556 100644
--- a/llvm/lib/CodeGen/RegAllocLinearScan.cpp
+++ b/llvm/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);
OpenPOWER on IntegriCloud