]> granicus.if.org Git - clang/commit
[OPENMP, NVPTX] Improve globalization of the variables captured by value.
authorAlexey Bataev <a.bataev@hotmail.com>
Thu, 15 Mar 2018 18:10:54 +0000 (18:10 +0000)
committerAlexey Bataev <a.bataev@hotmail.com>
Thu, 15 Mar 2018 18:10:54 +0000 (18:10 +0000)
commit75f6d614881f468dac0130a0f41a341ddf7a3302
treef9628e770522c2f0d5767344c5f411481a16bf55
parentecef9fa6ef2f1500522763d354ed1dee5201b085
[OPENMP, NVPTX] Improve globalization of the variables captured by value.

If the variable is captured by value and the corresponding parameter in
the outlined function escapes its declaration context, this parameter
must be globalized. To globalize it we need to get the address of the
original parameter, load the value, store it to the global address and
use this global address instead of the original.

Patch improves globalization for parallel|teams regions + functions in
declare target regions.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@327654 91177308-0d34-0410-b5e6-96231b3b80d8
lib/CodeGen/CGOpenMPRuntimeNVPTX.cpp
lib/CodeGen/CGOpenMPRuntimeNVPTX.h
lib/CodeGen/CGStmtOpenMP.cpp
test/OpenMP/declare_target_codegen_globalization.cpp [new file with mode: 0644]
test/OpenMP/nvptx_teams_codegen.cpp