[llvm-commits] [llvm] r99378 - /llvm/trunk/lib/CodeGen/MachineCSE.cpp

Evan Cheng evan.cheng at apple.com
Tue Mar 23 18:50:28 PDT 2010


Author: evancheng
Date: Tue Mar 23 20:50:28 2010
New Revision: 99378

URL: http://llvm.org/viewvc/llvm-project?rev=99378&view=rev
Log:
dbg_value may end a block.

Modified:
    llvm/trunk/lib/CodeGen/MachineCSE.cpp

Modified: llvm/trunk/lib/CodeGen/MachineCSE.cpp
URL: http://llvm.org/viewvc/llvm-project/llvm/trunk/lib/CodeGen/MachineCSE.cpp?rev=99378&r1=99377&r2=99378&view=diff
==============================================================================
--- llvm/trunk/lib/CodeGen/MachineCSE.cpp (original)
+++ llvm/trunk/lib/CodeGen/MachineCSE.cpp Tue Mar 23 20:50:28 2010
@@ -118,14 +118,14 @@
                                         MachineBasicBlock::const_iterator E) {
   unsigned LookAheadLeft = 5;
   while (LookAheadLeft) {
+    // Skip over dbg_value's.
+    while (I != E && I->isDebugValue())
+      ++I;
+
     if (I == E)
       // Reached end of block, register is obviously dead.
       return true;
 
-    // Skip over dbg_value's.
-    while (I->isDebugValue())
-      ++I;
-
     bool SeenDef = false;
     for (unsigned i = 0, e = I->getNumOperands(); i != e; ++i) {
       const MachineOperand &MO = I->getOperand(i);





More information about the llvm-commits mailing list