aeubanks added a comment. This makes sense to me, we need to add the PassBuilder callbacks in both the prelink/normal and postlink steps, and those are separated.
================ Comment at: llvm/include/llvm/LTO/Config.h:54 + /// For adding passes that run by opt. + std::function<void(PassBuilder &)> OptPassBuilderHook; Optional<Reloc::Model> RelocModel = Reloc::PIC_; ---------------- tejohnson wrote: > Is this essentially the new PM equivalent to PreCodeGenPassesHook above > (since this new hook runs at the end of opt)? > Also, might be good to name this like OptimizerLastPassBuilderHook or > something like that to indicate its position within the opt pipeline. I think the idea is that this callback adds PassBuilder callbacks in various parts of the the pipeline. Perhaps just `PassBuilderHook`? It's weird that we only allow one, but I guess we can make it a vector in the future if necessary. ================ Comment at: llvm/lib/LTO/LTOBackend.cpp:327-328 + if (Conf.OptPassBuilderHook) + Conf.OptPassBuilderHook(PB); + ---------------- this should go in `runNewPMPasses()`, not `runNewPMCustomPasses()`. Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.llvm.org/D96456/new/ https://reviews.llvm.org/D96456 _______________________________________________ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits