[OpenMP] Simplify variable sharing and increase shared memory size
authorJohannes Doerfert <johannes@jdoerfert.de>
Sun, 11 Jul 2021 00:01:56 +0000 (19:01 -0500)
committerJohannes Doerfert <johannes@jdoerfert.de>
Mon, 12 Jul 2021 00:18:03 +0000 (19:18 -0500)
commit1ab1f04a2be34bea2fb34df0f5ff0bd75bdc7aa0
tree88e73ee53e9554df90764cef122251cef15a5139
parent792aac98973daf573a288ae0cbdc9e2633f599e5
[OpenMP] Simplify variable sharing and increase shared memory size

In order to avoid malloc/free, up to NUM_SHARED_VARIABLES_IN_SHARED_MEM
(=64) variables are communicated in dedicated shared memory instead. The
simplification does avoid the need for an "init" and requires "deinit"
only if we ever communicate more than NUM_SHARED_VARIABLES_IN_SHARED_MEM
variables.

Differential Revision: https://reviews.llvm.org/D105767
openmp/libomptarget/deviceRTLs/amdgcn/src/target_impl.h
openmp/libomptarget/deviceRTLs/common/omptarget.h
openmp/libomptarget/deviceRTLs/common/src/data_sharing.cu
openmp/libomptarget/deviceRTLs/common/src/omp_data.cu
openmp/libomptarget/deviceRTLs/common/src/omptarget.cu
openmp/libomptarget/deviceRTLs/nvptx/src/target_impl.h