[Clang][OpenMP] Codegen generation for has_device_addr claues.
authorJennifer Yu <jennifer.yu@intel.com>
Tue, 20 Sep 2022 08:38:34 +0000 (01:38 -0700)
committerJennifer Yu <jennifer.yu@intel.com>
Wed, 21 Sep 2022 04:12:30 +0000 (21:12 -0700)
commit48ffd40ba295f2cb194237737d9c378348c7b1c9
treead2fa08611763b1b9d93bd63bcdf3e07052c9fd7
parente0a6df53b4b40f7579a3f10fc194880fe9479e49
[Clang][OpenMP] Codegen generation for has_device_addr claues.

This patch add codegen support for the has_device_addr clause. It use
the same logic of is_device_ptr. But passing &var instead pointer to var
to kernal.

Differential Revision: https://reviews.llvm.org/D134268
clang/lib/CodeGen/CGOpenMPRuntime.cpp
clang/lib/Sema/SemaOpenMP.cpp
clang/test/OpenMP/target_has_device_addr_codegen.cpp [new file with mode: 0644]
clang/test/OpenMP/target_has_device_addr_codegen_01.cpp [new file with mode: 0644]
openmp/libomptarget/test/mapping/has_device_addr.cpp [new file with mode: 0644]
openmp/libomptarget/test/mapping/target_has_device_addr.c [new file with mode: 0644]