]> granicus.if.org Git - clang/commit
[OpenMP] Codegen for the 'target parallel' directive on the NVPTX device.
authorArpith Chacko Jacob <acjacob@us.ibm.com>
Wed, 18 Jan 2017 19:35:00 +0000 (19:35 +0000)
committerArpith Chacko Jacob <acjacob@us.ibm.com>
Wed, 18 Jan 2017 19:35:00 +0000 (19:35 +0000)
commit5006cc1271a1d53fe524af49749adc1dbe7664b2
treecd8d417ae8d63798cfa2017431ec34f7e7ad37ff
parent2e52b0ff4e05161731046d3387e88db4bce38f5e
[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
lib/CodeGen/CGOpenMPRuntimeNVPTX.cpp
lib/CodeGen/CGOpenMPRuntimeNVPTX.h
test/OpenMP/nvptx_target_codegen.cpp
test/OpenMP/nvptx_target_parallel_codegen.cpp [new file with mode: 0644]