[Openmp-commits] [PATCH] D93727: [OpenMP] Add using bit flags to select Libomptarget Information
Vyacheslav Zakharin via Phabricator via Openmp-commits
openmp-commits at lists.llvm.org
Tue Jan 26 15:07:40 PST 2021
vzakhari added a comment.
In D93727#2523723 <https://reviews.llvm.org/D93727#2523723>, @jhuber6 wrote:
> 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 () { ... }
Thank you all for the investigation. Fixed in https://reviews.llvm.org/D95486
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