[OPENMP][NVPTX]Use __kmpc_barrier_simple_spmd(nullptr, 0) instead of
authorAlexey Bataev <a.bataev@hotmail.com>
Thu, 3 Jan 2019 16:25:35 +0000 (16:25 +0000)
committerAlexey Bataev <a.bataev@hotmail.com>
Thu, 3 Jan 2019 16:25:35 +0000 (16:25 +0000)
commita3924b517e2d10c25ee3b41dfd96bb9a5333b64e
treec616eef5a288481766e0d99333a0f7e00380a83b
parent16228bc65e46de9045d522dfe7afbba8c4bb5955
[OPENMP][NVPTX]Use __kmpc_barrier_simple_spmd(nullptr, 0) instead of
nvvm_barrier0.

Use runtime functions instead of the direct call to the nvvm intrinsics.
It allows to prevent some dangerous LLVM optimizations, that breaks the
code for the NVPTX target.

llvm-svn: 350328
clang/lib/CodeGen/CGOpenMPRuntimeNVPTX.cpp
clang/lib/CodeGen/CGOpenMPRuntimeNVPTX.h
clang/test/OpenMP/nvptx_data_sharing.cpp
clang/test/OpenMP/nvptx_parallel_codegen.cpp
clang/test/OpenMP/nvptx_parallel_for_codegen.cpp
clang/test/OpenMP/nvptx_target_codegen.cpp
clang/test/OpenMP/nvptx_target_teams_codegen.cpp
clang/test/OpenMP/nvptx_target_teams_distribute_codegen.cpp