]> granicus.if.org Git - clang/commit
[OPENMP]Target region: emit const firstprivates as globals with constant
authorAlexey Bataev <a.bataev@hotmail.com>
Tue, 5 Mar 2019 17:47:18 +0000 (17:47 +0000)
committerAlexey Bataev <a.bataev@hotmail.com>
Tue, 5 Mar 2019 17:47:18 +0000 (17:47 +0000)
commit8650dc5d838e74671340f7bca62beedf75ae8a54
tree8fc5e064391ad3d51b4bb916b8d9df50a361a1a2
parent236ee6b2295308492268c9a3169d75f9d3258d3a
[OPENMP]Target region: emit const firstprivates as globals with constant
memory.

If the variable with the constant non-scalar type is firstprivatized in
the target region, the local copy is created with the data copying.
Instead, we allocate the copy in the constant memory and avoid extra
copying in the outlined target regions. This global copy is used in the
target regions without loss of the performance.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@355418 91177308-0d34-0410-b5e6-96231b3b80d8
lib/CodeGen/CGOpenMPRuntime.cpp
lib/CodeGen/CGOpenMPRuntime.h
lib/CodeGen/CGOpenMPRuntimeNVPTX.cpp
lib/CodeGen/CGOpenMPRuntimeNVPTX.h
lib/CodeGen/CGStmtOpenMP.cpp
test/OpenMP/nvptx_target_firstprivate_codegen.cpp
test/OpenMP/target_firstprivate_codegen.cpp