summaryrefslogtreecommitdiffstats
path: root/llvm/tools/bugpoint/ExtractFunction.cpp
diff options
context:
space:
mode:
authorChris Lattner <sabre@nondot.org>2003-03-07 18:17:13 +0000
committerChris Lattner <sabre@nondot.org>2003-03-07 18:17:13 +0000
commit44ffd7c373063937e7858e6cfbc3459d2759a067 (patch)
tree87a1da7eb1b0211aa3a65e1876d3b047a86aacf3 /llvm/tools/bugpoint/ExtractFunction.cpp
parent569a57f9ff15c00e3eac9b302635cf722d13f723 (diff)
downloadbcm5719-llvm-44ffd7c373063937e7858e6cfbc3459d2759a067.tar.gz
bcm5719-llvm-44ffd7c373063937e7858e6cfbc3459d2759a067.zip
Make sure that intermediate code is verifier clean to avoid wierd problems.
llvm-svn: 5723
Diffstat (limited to 'llvm/tools/bugpoint/ExtractFunction.cpp')
-rw-r--r--llvm/tools/bugpoint/ExtractFunction.cpp5
1 files changed, 5 insertions, 0 deletions
diff --git a/llvm/tools/bugpoint/ExtractFunction.cpp b/llvm/tools/bugpoint/ExtractFunction.cpp
index c99c8f32b5f..007b726c2e4 100644
--- a/llvm/tools/bugpoint/ExtractFunction.cpp
+++ b/llvm/tools/bugpoint/ExtractFunction.cpp
@@ -11,6 +11,7 @@
#include "llvm/Transforms/IPO.h"
#include "llvm/Transforms/Scalar.h"
#include "llvm/Transforms/Utils/Cloning.h"
+#include "llvm/Analysis/Verifier.h"
#include "llvm/Type.h"
#include "llvm/Constant.h"
@@ -33,6 +34,7 @@ Module *BugDriver::extractFunctionFromModule(Function *F) const {
Passes.add(createGlobalDCEPass()); // Delete unreachable globals
Passes.add(createFunctionResolvingPass()); // Delete prototypes
Passes.add(createDeadTypeEliminationPass()); // Remove dead types...
+ Passes.add(createVerifierPass());
Passes.run(*Result);
return Result;
}
@@ -78,6 +80,8 @@ Module *BugDriver::deleteInstructionFromProgram(Instruction *I,
Passes.add(createDeadCodeEliminationPass());
if (Simplification)
Passes.add(createCFGSimplificationPass()); // Delete dead control flow
+
+ Passes.add(createVerifierPass());
Passes.run(*Result);
return Result;
}
@@ -90,6 +94,7 @@ Module *BugDriver::performFinalCleanups() const {
PassManager CleanupPasses;
CleanupPasses.add(createFunctionResolvingPass());
CleanupPasses.add(createGlobalDCEPass());
+ CleanupPasses.add(createVerifierPass());
Module *M = CloneModule(Program);
CleanupPasses.run(*M);
return M;
OpenPOWER on IntegriCloud