[llvm-commits] CVS: llvm/lib/CodeGen/RegAllocLinearScan.cpp

Alkis Evlogimenos alkis at cs.uiuc.edu
Tue Jan 13 14:38:02 PST 2004


Changes in directory llvm/lib/CodeGen:

RegAllocLinearScan.cpp updated: 1.25 -> 1.26

---
Log message:

Fix bug introduced by previous commit: check if fixed intervals
overlap before adding their spill weight.


---
Diffs of the changes:  (+3 -0)

Index: llvm/lib/CodeGen/RegAllocLinearScan.cpp
diff -u llvm/lib/CodeGen/RegAllocLinearScan.cpp:1.25 llvm/lib/CodeGen/RegAllocLinearScan.cpp:1.26
--- llvm/lib/CodeGen/RegAllocLinearScan.cpp:1.25	Wed Jan  7 03:20:58 2004
+++ llvm/lib/CodeGen/RegAllocLinearScan.cpp	Tue Jan 13 14:37:01 2004
@@ -547,6 +547,9 @@
     // 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);





More information about the llvm-commits mailing list