[PATCH] D25343: [OpenCL] Mark group functions as convergent in opencl-c.h
Yaxun Liu via cfe-commits
cfe-commits at lists.llvm.org
Wed Oct 19 12:53:46 PDT 2016
yaxunl added a comment.
> Should we deprecate noduplicate then as convergent should cover both use cases for OpenCL I believe? As far as I understand noduplicate was added specifically for SPMD use cases...
noduplicate has different semantics than convergent. Although it is proposed for SPMD originally, it could be used by non-SPMD programs to forbid duplicate of functions. There may be applications using this attribute.
I would suggest to leave this question for future. Probably ask llvm-dev first since the attribute is also in LLVM.
================
Comment at: include/clang/Basic/AttrDocs.td:630
+ void convfunc(void) __attribute__((convergent));
+ // Setting it as a C++11 attribute is also valid in a C++ program.
+ // void convfunc(void) [[clang::convergent]];
----------------
Anastasia wrote:
> Did you mean "in an OpenCL program"?
No.
In C++ program only, it is also valid to set it as C++11 attribute.
OpenCL does not support C++11 attribute.
https://reviews.llvm.org/D25343
More information about the cfe-commits
mailing list