[llvm-commits] [llvm] r66576 - /llvm/trunk/lib/Transforms/Scalar/InstructionCombining.cpp
Dale Johannesen
dalej at apple.com
Tue Mar 10 14:19:56 PDT 2009
Author: johannes
Date: Tue Mar 10 16:19:49 2009
New Revision: 66576
URL: http://llvm.org/viewvc/llvm-project?rev=66576&view=rev
Log:
Removing a dead debug intrinsic shouldn't trigger
another instcombine pass if we weren't going to make
one without debug info.
Modified:
llvm/trunk/lib/Transforms/Scalar/InstructionCombining.cpp
Modified: llvm/trunk/lib/Transforms/Scalar/InstructionCombining.cpp
URL: http://llvm.org/viewvc/llvm-project/llvm/trunk/lib/Transforms/Scalar/InstructionCombining.cpp?rev=66576&r1=66575&r2=66576&view=diff
==============================================================================
--- llvm/trunk/lib/Transforms/Scalar/InstructionCombining.cpp (original)
+++ llvm/trunk/lib/Transforms/Scalar/InstructionCombining.cpp Tue Mar 10 16:19:49 2009
@@ -12566,12 +12566,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