Author: Sameer Sahasrabuddhe Date: 2025-04-17T05:13:54Z New Revision: bc1725ef3a2707c244d8c2a401d7545755f96cbd
URL: https://github.com/llvm/llvm-project/commit/bc1725ef3a2707c244d8c2a401d7545755f96cbd DIFF: https://github.com/llvm/llvm-project/commit/bc1725ef3a2707c244d8c2a401d7545755f96cbd.diff LOG: [clang] convergent attribute does not require "all threads" (#135803) The documentation for the `convergent` attribute claims that OpenCL and CUDA require "all threads" in a group to call the same convergent operation. This is true only for OpenCL, and in general, the `convergent` attribute is used in LLVM IR on operations that have no such constraint. Added: Modified: clang/include/clang/Basic/AttrDocs.td Removed: ################################################################################ diff --git a/clang/include/clang/Basic/AttrDocs.td b/clang/include/clang/Basic/AttrDocs.td index 76f805ef373dd..29d1d2c69e824 100644 --- a/clang/include/clang/Basic/AttrDocs.td +++ b/clang/include/clang/Basic/AttrDocs.td @@ -1680,10 +1680,6 @@ translated into the LLVM ``convergent`` attribute, which indicates that the call instructions of a function with this attribute cannot be made control-dependent on any additional values. -In languages designed for SPMD/SIMT programming model, e.g. OpenCL or CUDA, -the call instructions of a function with this attribute must be executed by -all work items or threads in a work group or sub group. - This attribute is diff erent from ``noduplicate`` because it allows duplicating function calls if it can be proved that the duplicated function calls are not made control-dependent on any additional values, e.g., unrolling a loop _______________________________________________ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits