forked from OSchip/llvm-project
When cleaning up the final bytecode file, make sure to run DTE as well
llvm-svn: 5917
This commit is contained in:
parent
0cd5d533d0
commit
b0143880f4
|
@ -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;
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in New Issue