mirror of
https://github.com/c64scene-ar/llvm-6502.git
synced 2025-02-10 04:33:40 +00:00
GlobalDCE should be run at -O2 / -Os to eliminate unused dtor, etc. rdar://9142819
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@164850 91177308-0d34-0410-b5e6-96231b3b80d8
This commit is contained in:
parent
21731d876c
commit
f5fdc14df9
@ -211,13 +211,12 @@ void PassManagerBuilder::populateModulePassManager(PassManagerBase &MPM) {
|
||||
// FIXME: We shouldn't bother with this anymore.
|
||||
MPM.add(createStripDeadPrototypesPass()); // Get rid of dead prototypes
|
||||
|
||||
// GlobalOpt already deletes dead functions and globals, at -O3 try a
|
||||
// GlobalOpt already deletes dead functions and globals, at -O2 try a
|
||||
// late pass of GlobalDCE. It is capable of deleting dead cycles.
|
||||
if (OptLevel > 2)
|
||||
if (OptLevel > 1) {
|
||||
MPM.add(createGlobalDCEPass()); // Remove dead fns and globals.
|
||||
|
||||
if (OptLevel > 1)
|
||||
MPM.add(createConstantMergePass()); // Merge dup global constants
|
||||
}
|
||||
}
|
||||
addExtensionsToPM(EP_OptimizerLast, MPM);
|
||||
}
|
||||
|
Loading…
x
Reference in New Issue
Block a user