[OpenMP][NVPTX] Simplify codegen for orphaned parallel, NFCI.
authorJonas Hahnfeld <hahnjo@hahnjo.de>
Tue, 2 Oct 2018 19:12:54 +0000 (19:12 +0000)
committerJonas Hahnfeld <hahnjo@hahnjo.de>
Tue, 2 Oct 2018 19:12:54 +0000 (19:12 +0000)
commit3ca4701d357d838800c62698e27da55847c9a517
tree86e78fafeaeaac23b96319dad87b8eb5edc0cb31
parent5aaaecea7c9dfc0078465e55dafcfa9e619e8eee
[OpenMP][NVPTX] Simplify codegen for orphaned parallel, NFCI.

Worker threads fork off to the compiler generated worker function
directly after entering the kernel function. Hence, there is no
need to check whether the current thread is the master if we are
outside of a parallel region (neither SPMD nor parallel_level > 0).

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

llvm-svn: 343618
clang/lib/CodeGen/CGOpenMPRuntimeNVPTX.cpp
clang/test/OpenMP/nvptx_target_codegen.cpp