diff options
author | Chris Lattner <sabre@nondot.org> | 2003-08-01 16:13:49 +0000 |
---|---|---|
committer | Chris Lattner <sabre@nondot.org> | 2003-08-01 16:13:49 +0000 |
commit | f7e125403bcbc2216fdc20eb70f659cafee89061 (patch) | |
tree | 728de05cdbee76e3fc570fc30876c1de9b1ed0c1 /llvm/tools/bugpoint/ExtractFunction.cpp | |
parent | 89f93976689925fdd8c6456c3f3aa0f20fdb9c0f (diff) | |
download | bcm5719-llvm-f7e125403bcbc2216fdc20eb70f659cafee89061.tar.gz bcm5719-llvm-f7e125403bcbc2216fdc20eb70f659cafee89061.zip |
Parameterize the performFinalCleanups a bit
llvm-svn: 7477
Diffstat (limited to 'llvm/tools/bugpoint/ExtractFunction.cpp')
-rw-r--r-- | llvm/tools/bugpoint/ExtractFunction.cpp | 6 |
1 files changed, 3 insertions, 3 deletions
diff --git a/llvm/tools/bugpoint/ExtractFunction.cpp b/llvm/tools/bugpoint/ExtractFunction.cpp index 1aefcefad4b..525c7467f16 100644 --- a/llvm/tools/bugpoint/ExtractFunction.cpp +++ b/llvm/tools/bugpoint/ExtractFunction.cpp @@ -79,8 +79,8 @@ Module *BugDriver::deleteInstructionFromProgram(Instruction *I, /// a series of cleanups intended to get rid of extra cruft on the module /// before handing it to the user... /// -Module *BugDriver::performFinalCleanups() const { - Module *M = CloneModule(Program); +Module *BugDriver::performFinalCleanups(Module *InM) const { + Module *M = InM ? InM : CloneModule(Program); // Allow disabling these passes if they crash bugpoint. // @@ -97,7 +97,7 @@ Module *BugDriver::performFinalCleanups() const { CleanupPasses.add(createFunctionResolvingPass()); CleanupPasses.add(createGlobalDCEPass()); CleanupPasses.add(createDeadTypeEliminationPass()); - CleanupPasses.add(createDeadArgEliminationPass(true)); + CleanupPasses.add(createDeadArgEliminationPass(InM == 0)); CleanupPasses.add(createVerifierPass()); CleanupPasses.run(*M); return M; |