summaryrefslogtreecommitdiffstats
path: root/lib/Transforms/Scalar/ADCE.cpp
diff options
context:
space:
mode:
authorDevang Patel <dpatel@apple.com>2008-11-11 00:54:10 +0000
committerDevang Patel <dpatel@apple.com>2008-11-11 00:54:10 +0000
commit35275f499a95b0b7230311cee05d686310310baa (patch)
tree3a16b2ed63deb13f732df6c70cedbd983921099a /lib/Transforms/Scalar/ADCE.cpp
parent780c38d84f5dbe3bafecac5cdeb061c87618710a (diff)
downloadexternal_llvm-35275f499a95b0b7230311cee05d686310310baa.zip
external_llvm-35275f499a95b0b7230311cee05d686310310baa.tar.gz
external_llvm-35275f499a95b0b7230311cee05d686310310baa.tar.bz2
Cleanup debug info. assocated with deleted instructions.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@59012 91177308-0d34-0410-b5e6-96231b3b80d8
Diffstat (limited to 'lib/Transforms/Scalar/ADCE.cpp')
-rw-r--r--lib/Transforms/Scalar/ADCE.cpp9
1 files changed, 7 insertions, 2 deletions
diff --git a/lib/Transforms/Scalar/ADCE.cpp b/lib/Transforms/Scalar/ADCE.cpp
index 3481c00..31e6bef 100644
--- a/lib/Transforms/Scalar/ADCE.cpp
+++ b/lib/Transforms/Scalar/ADCE.cpp
@@ -26,7 +26,7 @@
#include "llvm/ADT/SmallPtrSet.h"
#include "llvm/ADT/SmallVector.h"
#include "llvm/ADT/Statistic.h"
-
+#include "llvm/Transforms/Utils/DbgInfoUtils.h"
using namespace llvm;
@@ -89,7 +89,12 @@ bool ADCE::runOnFunction(Function& F) {
(*I)->eraseFromParent();
}
- return !worklist.empty();
+ if (!worklist.empty()) {
+ RemoveDeadDbgIntrinsics(F);
+ return true;
+ }
+
+ return false;
}
FunctionPass *llvm::createAggressiveDCEPass() {