mirror of
https://github.com/c64scene-ar/llvm-6502.git
synced 2025-03-01 16:31:13 +00:00
When cleaning up the final bytecode file, make sure to run DTE as well
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@5917 91177308-0d34-0410-b5e6-96231b3b80d8
This commit is contained in:
parent
68be6e7f6a
commit
16608b4c85
@ -64,11 +64,12 @@ Module *BugDriver::deleteInstructionFromProgram(Instruction *I,
|
||||
/// before handing it to the user...
|
||||
///
|
||||
Module *BugDriver::performFinalCleanups() const {
|
||||
Module *M = CloneModule(Program);
|
||||
PassManager CleanupPasses;
|
||||
CleanupPasses.add(createFunctionResolvingPass());
|
||||
CleanupPasses.add(createGlobalDCEPass());
|
||||
CleanupPasses.add(createDeadTypeEliminationPass());
|
||||
CleanupPasses.add(createVerifierPass());
|
||||
Module *M = CloneModule(Program);
|
||||
CleanupPasses.run(*M);
|
||||
return M;
|
||||
}
|
||||
|
Loading…
x
Reference in New Issue
Block a user