Open
Description
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:
- Are transformations of a
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:
- Are there any plans to add similar registration points like
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.