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

Chris Lattner lattner at cs.uiuc.edu
Wed Nov 17 20:02:25 PST 2004



Changes in directory llvm/lib/CodeGen:

LiveInterval.cpp updated: 1.15 -> 1.16
---
Log message:

Take another .7 seconds off of linear scan time.


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

Index: llvm/lib/CodeGen/LiveInterval.cpp
diff -u llvm/lib/CodeGen/LiveInterval.cpp:1.15 llvm/lib/CodeGen/LiveInterval.cpp:1.16
--- llvm/lib/CodeGen/LiveInterval.cpp:1.15	Wed Nov 17 21:47:34 2004
+++ llvm/lib/CodeGen/LiveInterval.cpp	Wed Nov 17 22:02:11 2004
@@ -68,14 +68,16 @@
   const_iterator je = other.end();
 
   assert((StartPos->start <= i->start || StartPos == other.begin()) &&
-         "Bogus start position hint!");
+         StartPos != other.end() && "Bogus start position hint!");
 
   if (i->start < j->start) {
     i = std::upper_bound(i, ie, j->start);
     if (i != ranges.begin()) --i;
   } else if (j->start < i->start) {
-    j = std::upper_bound(j, je, i->start);
-    if (j != other.ranges.begin()) --j;
+    if ((++StartPos)->start <= i->start) {
+      j = std::upper_bound(j, je, i->start);
+      if (j != other.ranges.begin()) --j;
+    }
   } else {
     return true;
   }






More information about the llvm-commits mailing list