[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 Dec 22 13:06:00 PST 2020


jhuber6 added inline comments.


================
Comment at: openmp/libomptarget/include/Debug.h:41
+/// 31-Bit field data attributes controlling information presented to the user.
+enum OpenMPInfoType : int32_t {
+  // Print data arguments and attributes upon entering an OpenMP device kernel.
----------------
JonChesterfield wrote:
> Why not uint32, with zero for all flags clear as the default?
I wanted to have a method for getting the info / debug levels that didn't expose them as global variables, so I put them in a function as static variables. But this required having a special value for uninitialized so the value is only read from `getenv` the first time it's called. I could change it to use a boolean or something and avoid the complexity of reserving the highest order bit.


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