[PATCH] D97414: [ThinLTO][NewPM] Clean up dead code under -O0
Arthur Eubanks via Phabricator via llvm-commits
llvm-commits at lists.llvm.org
Wed Feb 24 16:35:45 PST 2021
aeubanks added inline comments.
================
Comment at: llvm/lib/Passes/PassBuilder.cpp:1542
- if (Level == OptimizationLevel::O0)
+ if (Level == OptimizationLevel::O0) {
+ // Drop available_externally and unreferenced globals. This is necessary
----------------
tejohnson wrote:
> aeubanks wrote:
> > tejohnson wrote:
> > > Looking at the old PM, we also call:
> > > MPM.add(createLowerTypeTestsPass(nullptr, nullptr, true));
> > >
> > > to drop any leftover type tests. Thinking that should probably get added here too (it's normally done below in the ModuleSimplificationPipeline, but of course that doesn't get reached for O0).
> > It's already added right above, but only when we have an ImportSummary. Should another be added when we don't have an ImportSummary?
> Note the args are different - LTT needs to be called a second time with the third parameter set to true to remove all the type tests that the first call leaves behind for potential use in optimization.
ah I didn't notice that, done
Repository:
rG LLVM Github Monorepo
CHANGES SINCE LAST ACTION
https://reviews.llvm.org/D97414/new/
https://reviews.llvm.org/D97414
More information about the llvm-commits
mailing list