This is an archive of the discontinued LLVM Phabricator instance.

[OpenMP][NVPTX] Take functions in `deviceRTLs` as `convergent`
ClosedPublic

Authored by tianshilei1992 on Feb 3 2021, 1:31 PM.

Details

Summary

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).

Diff Detail

Event Timeline

tianshilei1992 created this revision.Feb 3 2021, 1:31 PM
tianshilei1992 requested review of this revision.Feb 3 2021, 1:31 PM
Herald added projects: Restricted Project, Restricted Project. · View Herald TranscriptFeb 3 2021, 1:31 PM

Please check in a clang FE test for the attribute as well, we have plenty test that use -fopenmp-is-device or add one as you see fit.

Added a test case in FE

jdoerfert accepted this revision.Feb 3 2021, 3:11 PM

LG, please backport

This revision is now accepted and ready to land.Feb 3 2021, 3:11 PM
This revision was landed with ongoing or failed builds.Feb 3 2021, 5:58 PM
This revision was automatically updated to reflect the committed changes.