[PATCH] D85755: [OPENMP]Do not add TGT_OMP_TARGET_PARAM flag to non-captured mapped arguments.

Alexey Bataev via Phabricator via cfe-commits cfe-commits at lists.llvm.org
Tue Aug 11 10:09:12 PDT 2020


ABataev created this revision.
ABataev added a reviewer: jdoerfert.
Herald added subscribers: guansong, yaxunl.
Herald added a project: clang.
ABataev requested review of this revision.

If the arguments are mapped, but are actually not used in the target
region, the compiler still adds attribute TGT_OMP_TARGET_PARAM for such
arguments. It makes the libomptarget to add such parameters to the list
of arguments, passed to the kernel at the runtime, and may lead to
incorrect results/crashes during execution.


Repository:
  rG LLVM Github Monorepo

https://reviews.llvm.org/D85755

Files:
  clang/lib/CodeGen/CGOpenMPRuntime.cpp
  clang/test/OpenMP/target_map_codegen_18.cpp
  clang/test/OpenMP/target_map_codegen_20.cpp
  clang/test/OpenMP/target_map_codegen_31.cpp
  clang/test/OpenMP/target_map_codegen_32.cpp
  clang/test/OpenMP/target_teams_map_codegen.cpp

-------------- next part --------------
A non-text attachment was scrubbed...
Name: D85755.284806.patch
Type: text/x-patch
Size: 31663 bytes
Desc: not available
URL: <http://lists.llvm.org/pipermail/cfe-commits/attachments/20200811/09060e1a/attachment-0001.bin>


More information about the cfe-commits mailing list