Commit Graph

5 Commits

Author SHA1 Message Date
Alexey Bataev d9c61e0b62 [OPENMP][NVPTX] Add support for lightweight runtime.
If the target construct can be executed in SPMD mode + it is a loop
based directive with static scheduling, we can use lightweight runtime
support.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@340953 91177308-0d34-0410-b5e6-96231b3b80d8
2018-08-29 18:32:21 +00:00
Gheorghe-Teodor Bercea 2fc21c4f2b [OpenMP] Initialize data sharing stack for SPMD case
Summary: In the SPMD case, we need to initialize the data sharing and globalization infrastructure. This covers the case when an SPMD region calls a function in a different compilation unit.

Reviewers: ABataev, carlo.bertolli, caomhin

Reviewed By: ABataev

Subscribers: Hahnfeld, jholewinski, guansong, cfe-commits

Differential Revision: https://reviews.llvm.org/D49188

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@337015 91177308-0d34-0410-b5e6-96231b3b80d8
2018-07-13 16:18:24 +00:00
Alexey Bataev a48ed89527 [OPENMP, NVPTX] Do not globalize variables with reference/pointer types.
In generic data-sharing mode we do not need to globalize
variables/parameters of reference/pointer types. They already are placed
in the global memory.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@332380 91177308-0d34-0410-b5e6-96231b3b80d8
2018-05-15 18:01:01 +00:00
Carlo Bertolli c6c9776cf9 [OpenMP] Extend NVPTX SPMD implementation of combined constructs
Differential Revision: https://reviews.llvm.org/D43852

This patch extends the SPMD implementation to all target constructs and guards this implementation under a new flag.




git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@326368 91177308-0d34-0410-b5e6-96231b3b80d8
2018-02-28 20:48:35 +00:00
Arpith Chacko Jacob 5006cc1271 [OpenMP] Codegen for the 'target parallel' directive on the NVPTX device.
This patch adds codegen for the 'target parallel' directive on the NVPTX
device.  We term offload OpenMP directives such as 'target parallel' and
'target teams distribute parallel for' as SPMD constructs.  SPMD constructs,
in contrast to Generic ones like the plain 'target', can never contain
a serial region.

SPMD constructs can be handled more efficiently on the GPU and do not
require the Warp Loop of the Generic codegen scheme. This patch adds
SPMD codegen support for 'target parallel' on the NVPTX device and can
be reused for other SPMD constructs.

Reviewers: ABataev
Differential Revision: https://reviews.llvm.org/D28755


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@292428 91177308-0d34-0410-b5e6-96231b3b80d8
2017-01-18 19:35:00 +00:00