[Openmp-commits] [PATCH] D100774: [OpenMP] Add function for setting LIBOMPTARGET_INFO at runtime
Jon Chesterfield via Phabricator via Openmp-commits
openmp-commits at lists.llvm.org
Thu Apr 22 11:45:30 PDT 2021
JonChesterfield added a comment.
In D100774#2709610 <https://reviews.llvm.org/D100774#2709610>, @jhuber6 wrote:
> The problem I had was that in `libomptarget` there wasn't a single instance of `#include "Debug.h"`. This meant that there were about three different versions of `InfoLevel`. This meant if the variable was static it wouldn't set everyone's version of `InfoLevel` when called from the function. It might've been a better solution to just require that `Debug.h` is included only once per library, then use a method like you described. It would certainly be nicer to not require setting the extern variables for each plugin, which is what I originally removed.
I think that was collateral damage from getInfoLevel being static. Changing that to just inline will mean a single copy per shared library, which seems to be the right semantics. Probably still want the local variable to be atomic qualified though.
Repository:
rG LLVM Github Monorepo
CHANGES SINCE LAST ACTION
https://reviews.llvm.org/D100774/new/
https://reviews.llvm.org/D100774
More information about the Openmp-commits
mailing list