[llvm-commits] CVS: llvm/tools/bugpoint/BugDriver.h ExtractFunction.cpp
Chris Lattner
lattner at cs.uiuc.edu
Fri Aug 1 11:14:02 PDT 2003
Changes in directory llvm/tools/bugpoint:
BugDriver.h updated: 1.12 -> 1.13
ExtractFunction.cpp updated: 1.10 -> 1.11
---
Log message:
Parameterize the performFinalCleanups a bit
---
Diffs of the changes:
Index: llvm/tools/bugpoint/BugDriver.h
diff -u llvm/tools/bugpoint/BugDriver.h:1.12 llvm/tools/bugpoint/BugDriver.h:1.13
--- llvm/tools/bugpoint/BugDriver.h:1.12 Mon Jul 28 15:59:16 2003
+++ llvm/tools/bugpoint/BugDriver.h Fri Aug 1 11:13:49 2003
@@ -147,9 +147,10 @@
/// performFinalCleanups - This method clones the current Program and performs
/// a series of cleanups intended to get rid of extra cruft on the module
- /// before handing it to the user...
+ /// before handing it to the user... if the module parameter is specified, it
+ /// operates directly on the specified Module, modifying it in place.
///
- Module *performFinalCleanups() const;
+ Module *performFinalCleanups(Module *M = 0) const;
/// initializeExecutionEnvironment - This method is used to set up the
/// environment for executing LLVM programs.
Index: llvm/tools/bugpoint/ExtractFunction.cpp
diff -u llvm/tools/bugpoint/ExtractFunction.cpp:1.10 llvm/tools/bugpoint/ExtractFunction.cpp:1.11
--- llvm/tools/bugpoint/ExtractFunction.cpp:1.10 Tue Jun 24 23:13:36 2003
+++ llvm/tools/bugpoint/ExtractFunction.cpp Fri Aug 1 11:13:49 2003
@@ -79,8 +79,8 @@
/// 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 @@
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;
More information about the llvm-commits
mailing list