[llvm-branch-commits] [llvm-branch] r99379 - /llvm/branches/Apple/Morbo/lib/CodeGen/MachineCSE.cpp

Evan Cheng evan.cheng at apple.com
Tue Mar 23 18:54:01 PDT 2010


Author: evancheng
Date: Tue Mar 23 20:54:01 2010
New Revision: 99379

URL: http://llvm.org/viewvc/llvm-project?rev=99379&view=rev
Log:
Merge 99378.

Modified:
    llvm/branches/Apple/Morbo/lib/CodeGen/MachineCSE.cpp

Modified: llvm/branches/Apple/Morbo/lib/CodeGen/MachineCSE.cpp
URL: http://llvm.org/viewvc/llvm-project/llvm/branches/Apple/Morbo/lib/CodeGen/MachineCSE.cpp?rev=99379&r1=99378&r2=99379&view=diff
==============================================================================
--- llvm/branches/Apple/Morbo/lib/CodeGen/MachineCSE.cpp (original)
+++ llvm/branches/Apple/Morbo/lib/CodeGen/MachineCSE.cpp Tue Mar 23 20:54:01 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-branch-commits mailing list