[llvm-commits] [llvm] r66579 - /llvm/branches/Apple/Dib/lib/Transforms/Scalar/InstructionCombining.cpp

Bill Wendling isanbard at gmail.com
Tue Mar 10 14:28:18 PDT 2009


Author: void
Date: Tue Mar 10 16:28:18 2009
New Revision: 66579

URL: http://llvm.org/viewvc/llvm-project?rev=66579&view=rev
Log:
--- Merging (from foreign repository) r66576 into '.':
U    lib/Transforms/Scalar/InstructionCombining.cpp

Removing a dead debug intrinsic shouldn't trigger
another instcombine pass if we weren't going to make
one without debug info.

Modified:
    llvm/branches/Apple/Dib/lib/Transforms/Scalar/InstructionCombining.cpp

Modified: llvm/branches/Apple/Dib/lib/Transforms/Scalar/InstructionCombining.cpp
URL: http://llvm.org/viewvc/llvm-project/llvm/branches/Apple/Dib/lib/Transforms/Scalar/InstructionCombining.cpp?rev=66579&r1=66578&r2=66579&view=diff

==============================================================================
--- llvm/branches/Apple/Dib/lib/Transforms/Scalar/InstructionCombining.cpp (original)
+++ llvm/branches/Apple/Dib/lib/Transforms/Scalar/InstructionCombining.cpp Tue Mar 10 16:28:18 2009
@@ -12527,12 +12527,15 @@
           BasicBlock::iterator I = Term; --I;
 
           DOUT << "IC: DCE: " << *I;
-          ++NumDeadInst;
-
+          // A debug intrinsic shouldn't force another iteration if we weren't
+          // going to do one without it.
+          if (!isa<DbgInfoIntrinsic>(I)) {
+            ++NumDeadInst;
+            Changed = true;
+          }
           if (!I->use_empty())
             I->replaceAllUsesWith(UndefValue::get(I->getType()));
           I->eraseFromParent();
-          Changed = true;
         }
       }
   }





More information about the llvm-commits mailing list