[PATCH] D110029: [OpenMP][Offloading] Use bitset to indicate execution mode instead of value

Johannes Doerfert via Phabricator via cfe-commits cfe-commits at lists.llvm.org
Sun Sep 19 22:24:28 PDT 2021


jdoerfert added inline comments.


================
Comment at: clang/lib/CodeGen/CGOpenMPRuntimeGPU.cpp:1118
+      llvm::GlobalValue::WeakAnyLinkage,
+      llvm::ConstantInt::get(CGM.Int8Ty, Mode ? 0x2 : 0x1),
+      Twine(Name, "_exec_mode"));
----------------
The magic constants need to go into OpenMPConstans.h as enum values.


================
Comment at: llvm/lib/Transforms/IPO/OpenMPOpt.cpp:3294
+    assert(ExecModeVal & 0x1 &&
+           "Initially non-SPMD kernel has SPMD exec mode!");
+    ExecMode->setInitializer(ConstantInt::get(
----------------
Same here.


================
Comment at: openmp/libomptarget/plugins/cuda/src/rtl.cpp:78
+  GENERIC = 0x1, // everything else
 };
 
----------------
I think you can include OpenMPConstants.h here.


Repository:
  rG LLVM Github Monorepo

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

https://reviews.llvm.org/D110029



More information about the cfe-commits mailing list