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

Evan Cheng evan.cheng at apple.com
Tue Jun 26 18:16:58 PDT 2007



Changes in directory llvm/lib/CodeGen:

LiveIntervalAnalysis.cpp updated: 1.248 -> 1.249
---
Log message:

Fix an obvious bug. Old code only worked for the entry block.

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

 LiveIntervalAnalysis.cpp |    7 ++++---
 1 files changed, 4 insertions(+), 3 deletions(-)


Index: llvm/lib/CodeGen/LiveIntervalAnalysis.cpp
diff -u llvm/lib/CodeGen/LiveIntervalAnalysis.cpp:1.248 llvm/lib/CodeGen/LiveIntervalAnalysis.cpp:1.249
--- llvm/lib/CodeGen/LiveIntervalAnalysis.cpp:1.248	Mon Jun 18 20:48:04 2007
+++ llvm/lib/CodeGen/LiveIntervalAnalysis.cpp	Tue Jun 26 20:16:36 2007
@@ -623,10 +623,11 @@
   }
 
 exit:
-  // Alias of a live-in register might not be used at all.
-  if (isAlias && end == 0) {
+  // Live-in register might not be used at all.
+  if (end == MIIdx) {
     DOUT << " dead";
-    end = getDefIndex(start) + 1;
+    if (isAlias)
+      end = getDefIndex(MIIdx) + 1;
   }
 
   assert(start < end && "did not find end of interval?");






More information about the llvm-commits mailing list