[Openmp-commits] [PATCH] D102043: [libomptarget] Look for plugins next to libomptarget.so

Jon Chesterfield via Phabricator via Openmp-commits openmp-commits at lists.llvm.org
Thu Aug 26 10:54:19 PDT 2021


JonChesterfield added a comment.

The phab comment no longer makes sense but the code is right I think. The semantic change here is to ignore the various dynamic search mechanisms when looking for the plugin in favour of using the plugin that is next to libomptarget. That means whatever method found libomptarget also specifies the plugin, even if it was one of the methods that doesn't work transitively.

If `dladdr((void *)&__tgt_register_lib..` fails, this path gives up. I don't know of a reason why it would fail, but if something is going wrong there, trying to find some other plugin instead seems unlikely to help the user debug it.

The control flow would be slightly more obvious here if the loop was unswitched, but the indentation change will hurt readability of the diff. I'd like to put if (var == "") in front of the loop as a follow up NFC patch.


Repository:
  rG LLVM Github Monorepo

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

https://reviews.llvm.org/D102043



More information about the Openmp-commits mailing list