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 | f22a5c6e9ebfeb850e5397cf32a48106202ce1ae (patch) | |
tree | ce7b21c3d61ff1edf7d381b3c93902c4034ea6cb | |
parent | 155b6220f79ca2dbd47193c1c061e6e129b977ab (diff) |
minor cleanup
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@34846 91177308-0d34-0410-b5e6-96231b3b80d8
-rw-r--r-- | lib/Transforms/Scalar/InstructionCombining.cpp | 8 |
1 files changed, 2 insertions, 6 deletions
diff --git a/lib/Transforms/Scalar/InstructionCombining.cpp b/lib/Transforms/Scalar/InstructionCombining.cpp index 7d57022d0f..54eb91f185 100644 --- a/lib/Transforms/Scalar/InstructionCombining.cpp +++ b/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; } |