[llvm] [Offload] Only initialize a plugin if it is needed (PR #92765)
Jan Patrick Lehr via llvm-commits
llvm-commits at lists.llvm.org
Tue May 21 13:29:54 PDT 2024
================
@@ -160,6 +153,27 @@ void PluginManager::registerLib(__tgt_bin_desc *Desc) {
if (Entry.flags == OMP_REGISTER_REQUIRES)
PM->addRequirements(Entry.data);
+ // Initialize all the plugins that have associated images.
+ for (auto &Plugin : Plugins) {
+ if (Plugin->is_active())
----------------
jplehr wrote:
If it indicates that the `init` method was called, why not call `is_initialized`?
https://github.com/llvm/llvm-project/pull/92765
More information about the llvm-commits
mailing list