OSDN Git Service

[OpenMP][NVPTX] Take functions in `deviceRTLs` as `convergent`
authorShilei Tian <tianshilei1992@gmail.com>
Thu, 4 Feb 2021 01:57:59 +0000 (20:57 -0500)
committerTom Stellard <tstellar@redhat.com>
Thu, 4 Feb 2021 03:35:04 +0000 (19:35 -0800)
commitad2086658df181369a09ad69dac260a41dbab814
treee39a5a24fa083c7a2a589bfeea27b80be197f0e7
parenta9157c5628dc89b13936bbc8eef261cb02d63d40
[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

(cherry picked from commit 0f0ce3c12edefd25448e39c4d20718a10d3d42c1)
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]