diff options
author | Chris Lattner <sabre@nondot.org> | 2003-02-28 16:13:20 +0000 |
---|---|---|
committer | Chris Lattner <sabre@nondot.org> | 2003-02-28 16:13:20 +0000 |
commit | 514c02eb260bc0e9a7ddfdccc959bbfae79de42c (patch) | |
tree | 6a98ed6c8db64bfbf69e4c6aa34f8a108fdf58ac /llvm/tools/bugpoint/ExtractFunction.cpp | |
parent | 32a39c26e0117d895621f0727643812379054961 (diff) | |
download | bcm5719-llvm-514c02eb260bc0e9a7ddfdccc959bbfae79de42c.tar.gz bcm5719-llvm-514c02eb260bc0e9a7ddfdccc959bbfae79de42c.zip |
* Reduce the number of useless bytecode files produced by bugpoint.
- This also speeds it up as the bytecode writer isn't terribly fast.
* Add a new cleanup pass after everything else to run -funcresolve -globaldce
llvm-svn: 5668
Diffstat (limited to 'llvm/tools/bugpoint/ExtractFunction.cpp')
-rw-r--r-- | llvm/tools/bugpoint/ExtractFunction.cpp | 13 |
1 files changed, 13 insertions, 0 deletions
diff --git a/llvm/tools/bugpoint/ExtractFunction.cpp b/llvm/tools/bugpoint/ExtractFunction.cpp index 9b5440c0d4e..c99c8f32b5f 100644 --- a/llvm/tools/bugpoint/ExtractFunction.cpp +++ b/llvm/tools/bugpoint/ExtractFunction.cpp @@ -81,3 +81,16 @@ Module *BugDriver::deleteInstructionFromProgram(Instruction *I, Passes.run(*Result); return Result; } + +/// 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... +/// +Module *BugDriver::performFinalCleanups() const { + PassManager CleanupPasses; + CleanupPasses.add(createFunctionResolvingPass()); + CleanupPasses.add(createGlobalDCEPass()); + Module *M = CloneModule(Program); + CleanupPasses.run(*M); + return M; +} |