[PATCH] D89158: [NewPM] Run all EP callbacks under -O0
Arthur Eubanks via Phabricator via cfe-commits
cfe-commits at lists.llvm.org
Tue Oct 27 17:33:48 PDT 2020
aeubanks marked an inline comment as done.
aeubanks added inline comments.
================
Comment at: llvm/lib/Passes/PassBuilder.cpp:1659
+ bool DebugLogging) {
+ for (auto &C : PipelineStartEPCallbacks)
+ C(MPM);
----------------
ychen wrote:
> What I have in mind is a newly added `O0EPCallbacks` field in PassBuilder class. Then we can keep existing EPCallbacks (including PipelineStartEPCallbacks) for >O0 optimization pipeline. Yeah, then you need to add related passes to O0EPCallbacks (for BPF in this case).
It's a tradeoff between having to specify required passes in both O0EPCallbacks and PipelineStartEPCallbacks which is repetitive, versus making all callbacks in PipelineStartEPCallbacks run at -O0, meaning even optional passes in PipelineStartEPCallbacks will run at -O0 (may be skipped via optnone).
The legacy PM chooses the first, and I'm inclined to keep it that way just for consistency.
If we did go down the second route, we could just have a second TargetMachine API like TargetMachine::addO0Passes() which directly adds passes to a ModulePassManager.
Repository:
rG LLVM Github Monorepo
CHANGES SINCE LAST ACTION
https://reviews.llvm.org/D89158/new/
https://reviews.llvm.org/D89158
More information about the cfe-commits
mailing list