[Openmp-commits] [PATCH] D93727: [OpenMP] Add using bit flags to select Libomptarget Information
Joseph Huber via Phabricator via Openmp-commits
openmp-commits at lists.llvm.org
Tue Jan 26 13:19:16 PST 2021
jhuber6 added a comment.
In D93727#2523719 <https://reviews.llvm.org/D93727#2523719>, @JonChesterfield wrote:
> Can mark the function itself as ((used)), for slightly less typing. Seems a reasonable workaround to me, with a comment like 'workaround bug in gcc 5.ish'
Yeah, that's an option. Adding a dummy variable would defeat the original purpose of initializing the variables this way, rather than having each plugin initialize it individually and globally. This problem only seems to occur on GCC x86 from the compilers I've checked. The reason It wasn't failing on my machine was because it was GCC 6.3 on PPC. I'm assuming any other compilers will just ignore the attribute if they don't understand it. This should be sufficient.
static inline uint32_t __attribute__((used)) getInfoLevel () { ... }
static inline uint32_t __attribute__((used)) getDebugLevel () { ... }
Repository:
rG LLVM Github Monorepo
CHANGES SINCE LAST ACTION
https://reviews.llvm.org/D93727/new/
https://reviews.llvm.org/D93727
More information about the Openmp-commits
mailing list