[PATCH] D88138: [NPM] Add target specific hook to add passes for New Pass Manager
Arthur Eubanks via Phabricator via llvm-commits
llvm-commits at lists.llvm.org
Fri Sep 25 12:21:37 PDT 2020
aeubanks added a comment.
In D88138#2295673 <https://reviews.llvm.org/D88138#2295673>, @kparzysz wrote:
> In D88138#2294257 <https://reviews.llvm.org/D88138#2294257>, @aeubanks wrote:
>
>> I think I'm still missing how exactly this will fit into the pipeline. As in where is `registerPassBuilderCallbacks()` going to be called?
>
> Perhaps `EmitAssemblyHelper::EmitAssemblyWithNewPassManager` in BackendUtil.cpp. `PassBuilder` actually has `TM` as a member, so maybe from somewhere inside of `PassBuilder` itself, but I'm not sure whether that's the right thing to do.
Anywhere `adjustPassManager()` is called should have a corresponding call to `registerPassBuilderCallbacks()` in the NPM path. So yes `EmitAssemblyHelper::EmitAssemblyWithNewPassManager()` in `BackendUtil.cpp`, but also since `opt.cpp` calls `adjustPassManager()`, the corresponding NPM path in `NewPMDriver.cpp` should also call `registerPassBuilderCallbacks()`. Both places have access to a `TM`.
This should be done either before or in this patch, or else we can't test it and make sure it works.
CHANGES SINCE LAST ACTION
https://reviews.llvm.org/D88138/new/
https://reviews.llvm.org/D88138
More information about the llvm-commits
mailing list