[Openmp-commits] [PATCH] D69476: [nfc][libomptarget] Warp size aware logging by using builtinvar abstraction consistently. Last part of D69423

Jon Chesterfield via Phabricator via Openmp-commits openmp-commits at lists.llvm.org
Sun Oct 27 12:44:43 PDT 2019


JonChesterfield marked an inline comment as done.
JonChesterfield added inline comments.


================
Comment at: openmp/libomptarget/deviceRTLs/nvptx/src/supporti.h:126
+INLINE int GetMasterThreadID() {
+  return (GetNumberOfThreadsInBlock() - 1) & ~(WARPSIZE - 1);
+}
----------------
ABataev wrote:
> Hmm, why here it is not ttansformed into `-1`?
The `~`.  Change only converts the variable access into a function call.

Codegens as `(blockDim.x - 1) & -32` which seems reasonable.


Repository:
  rG LLVM Github Monorepo

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

https://reviews.llvm.org/D69476





More information about the Openmp-commits mailing list