[PATCH] D80917: [OpenMP][AMDGCN] Support OpenMP offloading for AMDGCN architecture - Part 2

Matt Arsenault via Phabricator via cfe-commits cfe-commits at lists.llvm.org
Mon Jun 1 10:12:37 PDT 2020


arsenm added inline comments.


================
Comment at: clang/include/clang/Basic/OpenMPGridValues.h:96
+    256,      // GV_Slot_Size
+    64,       // GV_Warp_Size
+    6,        // GV_Warp_Size_Log2
----------------
What about wave32?


================
Comment at: clang/include/clang/Basic/TargetInfo.h:1315
+
+  long long getLongGridValue(GPU::GVLIDX gv) const {
+    return LongGridValues[gv];
----------------
long long is the worst C type and should never be used. int64_t?


================
Comment at: clang/lib/Basic/Targets/AMDGPU.cpp:290
   assert(DataLayout->getAllocaAddrSpace() == Private);
+  GridValues = (const int *)&(GPU::AMDGPUGpuGridValues[0]);
+  LongGridValues = (const long long *)&(GPU::AMDGPUGpuLongGridValues[0]);
----------------
Why do these need casts?


Repository:
  rG LLVM Github Monorepo

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

https://reviews.llvm.org/D80917





More information about the cfe-commits mailing list