[OpenMP][NVPTX] Take functions in `deviceRTLs` as `convergent`
authorShilei Tian <tianshilei1992@gmail.com>
Thu, 4 Feb 2021 01:57:59 +0000 (20:57 -0500)
committerShilei Tian <tianshilei1992@gmail.com>
Thu, 4 Feb 2021 01:58:12 +0000 (20:58 -0500)
commit0f0ce3c12edefd25448e39c4d20718a10d3d42c1
treede49915e7b4cae570dc623d92e048c13c4f2f7bd
parent26b5be66f9c540028136f4fb4538c5786104abb9
[OpenMP][NVPTX] Take functions in `deviceRTLs` as `convergent`

OpenMP device compiler (similar to other SPMD compilers) assumes that
functions are convergent by default to avoid invalid transformations, such as
the bug (https://bugs.llvm.org/show_bug.cgi?id=49021).

Reviewed By: jdoerfert

Differential Revision: https://reviews.llvm.org/D95971
clang/lib/Frontend/CompilerInvocation.cpp
clang/test/OpenMP/target_attribute_convergent.cpp [new file with mode: 0644]
openmp/libomptarget/test/offloading/bug49021.cpp [new file with mode: 0644]