Cleanup debug info. assocated with deleted instructions.

llvm-svn: 59012
This commit is contained in:
Devang Patel 2008-11-11 00:54:10 +00:00
parent dc6699e82f
commit 53b39b5467

View File

@ -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() {