When cleaning up the final bytecode file, make sure to run DTE as well

llvm-svn: 5917
This commit is contained in:
Chris Lattner 2003-04-25 00:52:30 +00:00
parent 0cd5d533d0
commit b0143880f4
1 changed files with 2 additions and 1 deletions

View File

@ -64,11 +64,12 @@ Module *BugDriver::deleteInstructionFromProgram(Instruction *I,
/// before handing it to the user... /// before handing it to the user...
/// ///
Module *BugDriver::performFinalCleanups() const { Module *BugDriver::performFinalCleanups() const {
Module *M = CloneModule(Program);
PassManager CleanupPasses; PassManager CleanupPasses;
CleanupPasses.add(createFunctionResolvingPass()); CleanupPasses.add(createFunctionResolvingPass());
CleanupPasses.add(createGlobalDCEPass()); CleanupPasses.add(createGlobalDCEPass());
CleanupPasses.add(createDeadTypeEliminationPass());
CleanupPasses.add(createVerifierPass()); CleanupPasses.add(createVerifierPass());
Module *M = CloneModule(Program);
CleanupPasses.run(*M); CleanupPasses.run(*M);
return M; return M;
} }