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

Chris Lattner lattner at cs.uiuc.edu
Fri Jul 2 00:54:47 PDT 2004


Changes in directory llvm/lib/CodeGen:

LiveIntervals.cpp updated: 1.83 -> 1.84

---
Log message:

Revert patches 1.79 and 1.80 which had to do with dead MBB's.  Now that they
don't exist, we don't have to pretend to handle them.


---
Diffs of the changes:  (+4 -6)

Index: llvm/lib/CodeGen/LiveIntervals.cpp
diff -u llvm/lib/CodeGen/LiveIntervals.cpp:1.83 llvm/lib/CodeGen/LiveIntervals.cpp:1.84
--- llvm/lib/CodeGen/LiveIntervals.cpp:1.83	Thu Jul  1 01:15:32 2004
+++ llvm/lib/CodeGen/LiveIntervals.cpp	Fri Jul  2 00:52:23 2004
@@ -356,7 +356,8 @@
     }
 
     // a variable can only be killed by subsequent instructions
-    for (++mi; mi != e; ++mi) {
+    do {
+        ++mi;
         baseIndex += InstrSlots::NUM;
         for (KillIter ki = lv_->killed_begin(mi), ke = lv_->killed_end(mi);
              ki != ke; ++ki) {
@@ -366,13 +367,10 @@
                 goto exit;
             }
         }
-    }
+    } while (mi != e);
 
-    // LiveVariables does not compute information for dead basic blocks.
-    DEBUG(std::cerr << "Didn't find the end of the interval.  Must be in a "
-          "dead block.");
-    end = getDefIndex(start)+1;
 exit:
+    assert(start < end && "did not find end of interval?");
     interval.addRange(start, end);
     DEBUG(std::cerr << '\n');
 }





More information about the llvm-commits mailing list