diff options
| author | Chris Lattner <sabre@nondot.org> | 2007-03-02 19:59:19 +0000 |
|---|---|---|
| committer | Chris Lattner <sabre@nondot.org> | 2007-03-02 19:59:19 +0000 |
| commit | 51f5457ad4569d0136884e004ce712129004f073 (patch) | |
| tree | c9615f77c8c80eff97acdc8fe16d910556a16d1b /llvm/lib/Transforms/Scalar/InstructionCombining.cpp | |
| parent | c3b68788bbbea68adc7490b3de771d12da2520e5 (diff) | |
| download | bcm5719-llvm-51f5457ad4569d0136884e004ce712129004f073.tar.gz bcm5719-llvm-51f5457ad4569d0136884e004ce712129004f073.zip | |
minor cleanup
llvm-svn: 34846
Diffstat (limited to 'llvm/lib/Transforms/Scalar/InstructionCombining.cpp')
| -rw-r--r-- | llvm/lib/Transforms/Scalar/InstructionCombining.cpp | 8 |
1 files changed, 2 insertions, 6 deletions
diff --git a/llvm/lib/Transforms/Scalar/InstructionCombining.cpp b/llvm/lib/Transforms/Scalar/InstructionCombining.cpp index 7d57022d0fb..54eb91f185d 100644 --- a/llvm/lib/Transforms/Scalar/InstructionCombining.cpp +++ b/llvm/lib/Transforms/Scalar/InstructionCombining.cpp @@ -5799,13 +5799,9 @@ Instruction *InstCombiner::PromoteCastOfAllocation(CastInst &CI, while (UI != E && *UI == User) ++UI; // If this instruction uses AI more than once, don't break UI. - // Add operands to the worklist. - AddUsesToWorkList(*User); ++NumDeadInst; DOUT << "IC: DCE: " << *User; - - User->eraseFromParent(); - removeFromWorkList(User); + EraseInstFromFunction(*User); } } @@ -7389,7 +7385,7 @@ bool InstCombiner::transformConstExprCastCall(CallSite CS) { if (Caller->getType() != Type::VoidTy && !Caller->use_empty()) Caller->replaceAllUsesWith(NV); - Caller->getParent()->getInstList().erase(Caller); + Caller->eraseFromParent(); removeFromWorkList(Caller); return true; } |

