[llvm-commits] CVS: llvm/tools/bugpoint/ExtractFunction.cpp
Chris Lattner
lattner at cs.uiuc.edu
Wed May 21 15:40:01 PDT 2003
Changes in directory llvm/tools/bugpoint:
ExtractFunction.cpp updated: 1.8 -> 1.9
---
Log message:
Allow disabling final cleanups
---
Diffs of the changes:
Index: llvm/tools/bugpoint/ExtractFunction.cpp
diff -u llvm/tools/bugpoint/ExtractFunction.cpp:1.8 llvm/tools/bugpoint/ExtractFunction.cpp:1.9
--- llvm/tools/bugpoint/ExtractFunction.cpp:1.8 Wed May 21 14:41:31 2003
+++ llvm/tools/bugpoint/ExtractFunction.cpp Wed May 21 15:38:59 2003
@@ -26,6 +26,9 @@
cl::opt<bool>
NoSCFG("disable-simplifycfg",
cl::desc("Do not use the -simplifycfg pass to reduce testcases"));
+ cl::opt<bool>
+ NoFinalCleanup("disable-final-cleanup",
+ cl::desc("Disable the final cleanup phase of narrowing"));
}
/// deleteInstructionFromProgram - This method clones the current Program and
@@ -79,10 +82,17 @@
Module *BugDriver::performFinalCleanups() const {
Module *M = CloneModule(Program);
+ // Allow disabling these passes if they crash bugpoint.
+ //
+ // FIXME: This should eventually run these passes in a pass list to prevent
+ // them from being able to crash bugpoint at all!
+ //
+ if (NoFinalCleanup) return M;
+
// Make all functions external, so GlobalDCE doesn't delete them...
for (Module::iterator I = M->begin(), E = M->end(); I != E; ++I)
I->setLinkage(GlobalValue::ExternalLinkage);
-
+
PassManager CleanupPasses;
CleanupPasses.add(createFunctionResolvingPass());
CleanupPasses.add(createGlobalDCEPass());
More information about the llvm-commits
mailing list