From bb65098d2c8c08e1c45d5567c07f492e2a770aff Mon Sep 17 00:00:00 2001 From: Duncan Sands Date: Fri, 23 Nov 2007 09:10:17 +0000 Subject: [PATCH] Remove some logic I thoughtlessly copied over from the old ADCE implementation (there it was correct because the transform was being done for read-only functions). git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@44287 91177308-0d34-0410-b5e6-96231b3b80d8 --- lib/Transforms/Scalar/SimplifyCFG.cpp | 3 --- 1 file changed, 3 deletions(-) diff --git a/lib/Transforms/Scalar/SimplifyCFG.cpp b/lib/Transforms/Scalar/SimplifyCFG.cpp index 692a8af0a2a..3717a161aef 100644 --- a/lib/Transforms/Scalar/SimplifyCFG.cpp +++ b/lib/Transforms/Scalar/SimplifyCFG.cpp @@ -88,9 +88,6 @@ static void ChangeToCall(InvokeInst *II) { // Update PHI nodes in the unwind destination II->getUnwindDest()->removePredecessor(BB); BB->getInstList().erase(II); - - if (NewCall->use_empty()) - BB->getInstList().erase(NewCall); } /// IsNoReturn - Return true if the specified call is to a no-return function.