[PATCH] D52733: [OpenMP][NVPTX] Avoid data sharing if in parallel region

Jonas Hahnfeld via Phabricator via cfe-commits cfe-commits at lists.llvm.org
Mon Oct 1 10:10:14 PDT 2018


Hahnfeld created this revision.
Hahnfeld added reviewers: gtbercea, ABataev.
Herald added subscribers: cfe-commits, guansong, jholewinski.

Previously the generated code only checked if the kernel is executing
in SPMD mode. However a worker thread participating in a parallel
region will never execute serialize nested parallel directives and
doesn't need data sharing with other threads either.
Refactor the code from `emitNonSPMDParallelCall` into a helper function
to make clear that these two things use the same conditions.


Repository:
  rC Clang

https://reviews.llvm.org/D52733

Files:
  lib/CodeGen/CGOpenMPRuntimeNVPTX.cpp
  lib/CodeGen/CGOpenMPRuntimeNVPTX.h
  test/OpenMP/declare_target_codegen_globalization.cpp
  test/OpenMP/nvptx_target_codegen.cpp

-------------- next part --------------
A non-text attachment was scrubbed...
Name: D52733.167761.patch
Type: text/x-patch
Size: 19779 bytes
Desc: not available
URL: <http://lists.llvm.org/pipermail/cfe-commits/attachments/20181001/432fbdca/attachment-0001.bin>


More information about the cfe-commits mailing list