]> granicus.if.org Git - clang/commit
[OPENMP, NVPTX] Do not globalize local variables in parallel regions.
authorAlexey Bataev <a.bataev@hotmail.com>
Mon, 9 Jul 2018 17:43:58 +0000 (17:43 +0000)
committerAlexey Bataev <a.bataev@hotmail.com>
Mon, 9 Jul 2018 17:43:58 +0000 (17:43 +0000)
commit4a1455fb1c852ecc711d694480cd65eb98b37ad1
treeba98bb71124376aff1c48dd59883e112617531d2
parentb5784f85be57b6010e656f881e64ac3d2ad25f6a
[OPENMP, NVPTX] Do not globalize local variables in parallel regions.

In generic data-sharing mode we are allowed to not globalize local
variables that escape their declaration context iff they are declared
inside of the parallel region. We can do this because L2 parallel
regions are executed sequentially and, thus, we do not need to put
shared local variables in the global memory.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@336567 91177308-0d34-0410-b5e6-96231b3b80d8
lib/CodeGen/CGOpenMPRuntimeNVPTX.cpp
test/OpenMP/declare_target_codegen_globalization.cpp
test/OpenMP/nvptx_data_sharing.cpp
test/OpenMP/nvptx_distribute_parallel_generic_mode_codegen.cpp
test/OpenMP/nvptx_target_teams_distribute_parallel_for_generic_mode_codegen.cpp