[llvm-branch-commits] [clang] [llvm] [RFC][LLVM][Clang] Add LLVM plugin hook for back-ends (PR #170846)
Alexis Engelke via llvm-branch-commits
llvm-branch-commits at lists.llvm.org
Mon Dec 8 03:14:14 PST 2025
================
@@ -1017,16 +1018,9 @@ void EmitAssemblyHelper::RunOptimizationPipeline(
}
#endif
}
- // Attempt to load pass plugins and register their callbacks with PB.
- for (auto &PluginFN : CodeGenOpts.PassPlugins) {
- auto PassPlugin = PassPlugin::Load(PluginFN);
- if (PassPlugin) {
- PassPlugin->registerPassBuilderCallbacks(PB);
- } else {
- Diags.Report(diag::err_fe_unable_to_load_plugin)
- << PluginFN << toString(PassPlugin.takeError());
- }
- }
+ // Register plugin callbacks with PB.
+ for (auto &Plugin : Plugins)
+ Plugin.registerPassBuilderCallbacks(PB);
----------------
aengelke wrote:
*Need* no, they continue to work just fine.
- LTO: yes, might be good to have at some point in the future.
- Flang: likewise.
- clang-linker-wrapper: if there's interest, this can be added. While it currently seems to load plugins, it doesn't seem to call any methods on them.
- MLIR ModuleToObject::translateToISA also only seems to be used for GPUs and MLIR doesn't do anything related to plugins right now.
opt doesn't call and lld doesn't directly call back-ends.
https://github.com/llvm/llvm-project/pull/170846
More information about the llvm-branch-commits
mailing list