[PATCH] D89994: [libomptarget][nvptx] Undef, internal shared variables

Jon Chesterfield via Phabricator via cfe-commits cfe-commits at lists.llvm.org
Thu Oct 22 16:22:27 PDT 2020


JonChesterfield created this revision.
JonChesterfield added reviewers: jdoerfert, ABataev, grokos, tianshilei1992, ye-luo.
Herald added a project: clang.
Herald added a subscriber: cfe-commits.
JonChesterfield requested review of this revision.

[libomptarget][nvptx] Undef, internal shared variables

Shared variables on nvptx, and LDS on amdgcn, are uninitialized at
the start of kernel execution. Therefore create the variables with
undef instead of zeros, motivated in part by the amdgcn back end
rejecting LDS+initializer.

Common is zero initialized, which seems incompatible with shared. Thus
change them to internal, following the direction of
https://reviews.llvm.org/rG7b3eabdcd215

WIP, other tests need to be updated if direction is good


Repository:
  rG LLVM Github Monorepo

https://reviews.llvm.org/D89994

Files:
  clang/lib/CodeGen/CGOpenMPRuntimeGPU.cpp
  clang/test/OpenMP/nvptx_teams_reduction_codegen.cpp

-------------- next part --------------
A non-text attachment was scrubbed...
Name: D89994.300121.patch
Type: text/x-patch
Size: 13974 bytes
Desc: not available
URL: <http://lists.llvm.org/pipermail/cfe-commits/attachments/20201022/2d79a987/attachment-0001.bin>


More information about the cfe-commits mailing list