mirror of
https://github.com/c64scene-ar/llvm-6502.git
synced 2025-06-24 08:24:33 +00:00
* 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 git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@5668 91177308-0d34-0410-b5e6-96231b3b80d8
This commit is contained in:
@ -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;
|
||||
}
|
||||
|
Reference in New Issue
Block a user