[PATCH] D86037: [OpenMP][FIX] Do not use TBAA in type punning reduction GPU code PR46156

Johannes Doerfert via Phabricator via cfe-commits cfe-commits at lists.llvm.org
Sun Aug 16 08:41:59 PDT 2020


jdoerfert created this revision.
jdoerfert added reviewers: JonChesterfield, ABataev.
Herald added subscribers: guansong, bollu, kosarev, yaxunl.
Herald added a project: clang.
jdoerfert requested review of this revision.
Herald added a subscriber: sstefan1.

When we implement OpenMP GPU reductions we use type punning a lot during
the shuffle and reduce operations. This is not always compatible with
language rules on aliasing. So far we generated TBAA which later allowed
to remove some of the reduce code as accesses and initialization were
"known to not alias". With this patch we avoid TBAA in this step,
hopefully for all accesses that we need to.

Verified on the reproducer of PR46156 and QMCPack.


Repository:
  rG LLVM Github Monorepo

https://reviews.llvm.org/D86037

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

-------------- next part --------------
A non-text attachment was scrubbed...
Name: D86037.285888.patch
Type: text/x-patch
Size: 9162 bytes
Desc: not available
URL: <http://lists.llvm.org/pipermail/cfe-commits/attachments/20200816/e89346ea/attachment-0001.bin>


More information about the cfe-commits mailing list