[PATCH] D17012: Update document about convergent attribute.

Justin Lebar via llvm-commits llvm-commits at lists.llvm.org
Tue Feb 9 13:17:09 PST 2016


jlebar updated this revision to Diff 47355.
jlebar added a comment.

I reread this patch after explaining this change IRL today, and it now feels
unnecessarily vague.  With appologies for the churn, here's an attempt at being
more precise.

Please let me know what you think.


http://reviews.llvm.org/D17012

Files:
  docs/LangRef.rst

Index: docs/LangRef.rst
===================================================================
--- docs/LangRef.rst
+++ docs/LangRef.rst
@@ -1239,10 +1239,20 @@
     function call are also considered to be cold; and, thus, given low
     weight.
 ``convergent``
-    This attribute indicates that the callee is dependent on a convergent
-    thread execution pattern under certain parallel execution models.
-    Transformations that are execution model agnostic may not make the execution
-    of a convergent operation control dependent on any additional values.
+    This attribute indicates that the optimizer should preserve convergent
+    behavior produced by the callee.
+
+    In some parallel execution models, there exist operations that are useful
+    only if the optimizer does not make them control-dependent on any
+    additional values.  We call these operations (e.g. the
+    ``llvm.cuda.syncthreads`` intrinsic) ``intrinsically convergent``.
+
+    The ``convergent`` attribute indicates that the caller may rely on
+    convergent behavior within of the callee.  Unless it can be proved that the
+    callee does not transitively invoke an intrinsically convergent operation,
+    a convergent callee must not be made control-dependent on any additional
+    values.
+
 ``inaccessiblememonly``
     This attribute indicates that the function may only access memory that
     is not accessible by the module being compiled. This is a weaker form


-------------- next part --------------
A non-text attachment was scrubbed...
Name: D17012.47355.patch
Type: text/x-patch
Size: 1464 bytes
Desc: not available
URL: <http://lists.llvm.org/pipermail/llvm-commits/attachments/20160209/dee9cd12/attachment.bin>


More information about the llvm-commits mailing list