[PATCH] D89158: [NewPM] Run callbacks added via registerPipelineStartEPCallback under -O0
Eric Christopher via Phabricator via llvm-commits
llvm-commits at lists.llvm.org
Thu Oct 29 18:59:58 PDT 2020
echristo added a comment.
In D89158#2363220 <https://reviews.llvm.org/D89158#2363220>, @aeubanks wrote:
> Looking at BackendUtil.cpp in Clang as well as the Rust code, I'm back to thinking that we should provide a way to to all callbacks. Then in the case of passes added via TargetMachine, we should extend `TargetMachine::registerPassBuilderCallbacks` to also take a `PassBuilder::OptimizationLevel`. Then targets can skip adding optional optimization passes at -O0. Does that make sense? It would allow us to clean up Clang and Rust.
>
> In fact I see in `AMDGPUTargetMachine::adjustPassManager` a check for an optimization level, so some targets are already doing this, although it looks like it's more for codegen and not IR passes.
This sounds great. I'd love to see this.
-eric
Repository:
rG LLVM Github Monorepo
CHANGES SINCE LAST ACTION
https://reviews.llvm.org/D89158/new/
https://reviews.llvm.org/D89158
More information about the llvm-commits
mailing list