Callbacks to the CodeGen Pipeline via the New Pass Manager #78677
Labels
llvm:optimizations
question
A question, not bug report. Check out https://llvm.org/docs/GettingInvolved.html instead!
Hello!
[NPM="New Pass Manager", CGP="CodeGen Pipeline"]
As far as I understood it, the NPM only adds support to load passes via an external library to clang/opt/[...] that operate on a LLVM-IR unit, e.g. a Module. However, just recently a callback for a
MachineFunctionPass
was added - see #76320.Reading the documentation, the reason why this was added is because some passes that operate on IR need to validate their result in the MIR representation of the Functions. This leads me to my first question:
MachineFunctionPass
which gets loaded via a pass plugin and registered viaPassBuilder::registerPipelineParsingCallback
actually propagated to the resulting binary?My guess is no - the MIR objects passed to the pass are JITed and discarded. If that is true, this leads me to my second question:
PassBuilder::registerPipelineStartEPCallback
which make it possible to run passes that are loaded via a pass plugin as part of the CGP?Many thanks in advance, reading through the PRs and the evolution of the NPM was super interesting.
The text was updated successfully, but these errors were encountered: