From f7e125403bcbc2216fdc20eb70f659cafee89061 Mon Sep 17 00:00:00 2001 From: Chris Lattner Date: Fri, 1 Aug 2003 16:13:49 +0000 Subject: Parameterize the performFinalCleanups a bit llvm-svn: 7477 --- llvm/tools/bugpoint/ExtractFunction.cpp | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) (limited to 'llvm/tools/bugpoint/ExtractFunction.cpp') 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; -- cgit v1.2.3