[PATCH] D130889: [llvm] Introduce a pass plugin registry and loader

wael yehia via Phabricator via llvm-commits llvm-commits at lists.llvm.org
Wed Aug 3 08:58:53 PDT 2022


w2yehia added a comment.

Looks good. Thanks.



================
Comment at: llvm/lib/Passes/PassPluginLoader.cpp:23
+void PassPluginLoader::operator=(const std::string &Filename) {
+  sys::SmartScopedLock<true> Lock(*PluginsLock);
+  auto PassPlugin = PassPlugin::Load(Filename);
----------------
why do we need a lock? 
Is there a use case where multiple threads enter this function.
Right now, the only place we create a `PassPluginLoader` is in `cl::opt<PassPluginLoader> PassPlugins`.


Repository:
  rG LLVM Github Monorepo

CHANGES SINCE LAST ACTION
  https://reviews.llvm.org/D130889/new/

https://reviews.llvm.org/D130889



More information about the llvm-commits mailing list