diff options
| author | Dale Johannesen <dalej@apple.com> | 2009-03-10 21:19:49 +0000 |
|---|---|---|
| committer | Dale Johannesen <dalej@apple.com> | 2009-03-10 21:19:49 +0000 |
| commit | 703703aacb99062b1096250917193b57b15785a7 (patch) | |
| tree | c1cd51c5c83d4febd3451f8320ad5a072312781b /llvm/lib | |
| parent | ee66cf22492ff8667193e2f5d31b9aba1e7de8fd (diff) | |
| download | bcm5719-llvm-703703aacb99062b1096250917193b57b15785a7.tar.gz bcm5719-llvm-703703aacb99062b1096250917193b57b15785a7.zip | |
Removing a dead debug intrinsic shouldn't trigger
another instcombine pass if we weren't going to make
one without debug info.
llvm-svn: 66576
Diffstat (limited to 'llvm/lib')
| -rw-r--r-- | llvm/lib/Transforms/Scalar/InstructionCombining.cpp | 9 |
1 files changed, 6 insertions, 3 deletions
diff --git a/llvm/lib/Transforms/Scalar/InstructionCombining.cpp b/llvm/lib/Transforms/Scalar/InstructionCombining.cpp index 86048e6a15e..2bf87c0045d 100644 --- a/llvm/lib/Transforms/Scalar/InstructionCombining.cpp +++ b/llvm/lib/Transforms/Scalar/InstructionCombining.cpp @@ -12566,12 +12566,15 @@ bool InstCombiner::DoOneIteration(Function &F, unsigned Iteration) { 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; } } } |

