[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 04:39:04 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:

What is `active` and what is `initialized`?

`active`: Has an associated image
`initialized`: if it has an associated image, then it can (also) be initialized

https://github.com/llvm/llvm-project/pull/92765


More information about the llvm-commits mailing list