clang: Add -fconvergent-functions flag
authorMatt Arsenault <Matthew.Arsenault@amd.com>
Sun, 27 Oct 2019 00:15:10 +0000 (17:15 -0700)
committerMatt Arsenault <arsenm2@gmail.com>
Tue, 19 Nov 2019 17:50:15 +0000 (23:20 +0530)
commite531750c6cf9ab6ca987ffbfe100b1d766269eb5
treeab2dea2f82cf219be966b595561eb6d452ab00a5
parentce5de93e838f7391760ba2956c7e0ae5d203cb6f
clang: Add -fconvergent-functions flag

The CUDA builtin library is apparently compiled in C++ mode, so the
assumption of convergent needs to be made in a typically non-SPMD
language. The functions in the library should still be assumed
convergent. Currently they are not, which is potentially incorrect and
this happens to work after the library is linked.
clang/include/clang/Basic/LangOptions.def
clang/include/clang/Basic/LangOptions.h
clang/include/clang/Driver/Options.td
clang/lib/Frontend/CompilerInvocation.cpp
clang/test/CodeGen/convergent-functions.cpp [new file with mode: 0644]
clang/test/CodeGenCUDA/propagate-metadata.cu