aboutsummaryrefslogtreecommitdiff
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
commit10f22cb1a0f2755050218cd0e07221a0985c6b63 (patch)
tree99f86598965946844652ac135a0a7d50d1f8324e
parent3a43837d859bddfdc24bc0c2d87669a6300c7bfe (diff)
Make sure that intermediate code is verifier clean to avoid wierd problems.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@5723 91177308-0d34-0410-b5e6-96231b3b80d8
-rw-r--r--tools/bugpoint/ExtractFunction.cpp5
1 files changed, 5 insertions, 0 deletions
diff --git a/tools/bugpoint/ExtractFunction.cpp b/tools/bugpoint/ExtractFunction.cpp
index c99c8f32b5..007b726c2e 100644
--- a/tools/bugpoint/ExtractFunction.cpp
+++ b/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;