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

Alkis Evlogimenos alkis at cs.uiuc.edu
Mon Dec 22 13:26:43 PST 2003


Changes in directory llvm/lib/CodeGen:

LiveIntervals.cpp updated: 1.14 -> 1.15

---
Log message:

Fix crash when compiling twolf.


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

Index: llvm/lib/CodeGen/LiveIntervals.cpp
diff -u llvm/lib/CodeGen/LiveIntervals.cpp:1.14 llvm/lib/CodeGen/LiveIntervals.cpp:1.15
--- llvm/lib/CodeGen/LiveIntervals.cpp:1.14	Sun Dec 21 14:19:10 2003
+++ llvm/lib/CodeGen/LiveIntervals.cpp	Mon Dec 22 07:54:29 2003
@@ -146,7 +146,8 @@
         unsigned liveBlockIndex = it->first;
         MachineBasicBlock* liveBlock = it->second;
         if (liveBlockIndex < vi.AliveBlocks.size() &&
-            vi.AliveBlocks[liveBlockIndex]) {
+            vi.AliveBlocks[liveBlockIndex] &&
+            !liveBlock->empty()) {
             unsigned start =  getInstructionIndex(liveBlock->front());
             unsigned end = getInstructionIndex(liveBlock->back()) + 1;
             interval->addRange(start, end);





More information about the llvm-commits mailing list