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

Chris Lattner lattner at cs.uiuc.edu
Sun Jul 18 22:02:19 PDT 2004



Changes in directory llvm/lib/CodeGen:

RegAllocLinearScan.cpp updated: 1.78 -> 1.79

---
Log message:

Fix assertion to not dereference end!


---
Diffs of the changes:  (+2 -2)

Index: llvm/lib/CodeGen/RegAllocLinearScan.cpp
diff -u llvm/lib/CodeGen/RegAllocLinearScan.cpp:1.78 llvm/lib/CodeGen/RegAllocLinearScan.cpp:1.79
--- llvm/lib/CodeGen/RegAllocLinearScan.cpp:1.78	Sun Jul 18 23:47:36 2004
+++ llvm/lib/CodeGen/RegAllocLinearScan.cpp	Mon Jul 19 00:02:09 2004
@@ -399,8 +399,8 @@
         std::vector<LiveInterval*>::iterator addedItEnd = added.end();
         for (IntervalPtrs::iterator i = unhandled_.begin(), e =unhandled_.end();
              i != e && addedIt != addedItEnd; ++i) {
-            while ((*i)->start() > (*addedIt)->start() && 
-                   addedIt != addedItEnd) {
+            while (addedIt != addedItEnd &&
+                   (*i)->start() > (*addedIt)->start()) {
 #ifndef NDEBUG
                 // This code only works if addIntervalsForSpills retursn a
                 // sorted interval list.  Assert this is the case now.





More information about the llvm-commits mailing list