[PATCH] D150976: [LangRef] Document the de facto meaning of convergent

Jay Foad via Phabricator via llvm-commits llvm-commits at lists.llvm.org
Fri May 19 08:55:12 PDT 2023


foad created this revision.
foad added reviewers: nhaehnle, sameerds, ruiling.
Herald added subscribers: StephenFan, jdoerfert.
Herald added a project: All.
foad requested review of this revision.
Herald added a project: LLVM.
Herald added a subscriber: llvm-commits.

The "convergent" attribute was originally documented as "cannot be made
control-dependent on any *additional* values", but in practice it now
prevents any change in control dependence.


Repository:
  rG LLVM Github Monorepo

https://reviews.llvm.org/D150976

Files:
  llvm/docs/LangRef.rst


Index: llvm/docs/LangRef.rst
===================================================================
--- llvm/docs/LangRef.rst
+++ llvm/docs/LangRef.rst
@@ -1746,16 +1746,16 @@
     function call are also considered to be cold; and, thus, given low
     weight.
 ``convergent``
-    In some parallel execution models, there exist operations that cannot be
-    made control-dependent on any additional values.  We call such operations
-    ``convergent``, and mark them with this attribute.
+    In some parallel execution models, there exist operations that implicitly
+    depend on the set of values upon which they are control-dependent.  We call
+    such operations ``convergent``, and mark them with this attribute.
 
     The ``convergent`` attribute may appear on functions or call/invoke
     instructions.  When it appears on a function, it indicates that calls to
-    this function should not be made control-dependent on additional values.
-    For example, the intrinsic ``llvm.nvvm.barrier0`` is ``convergent``, so
-    calls to this intrinsic cannot be made control-dependent on additional
-    values.
+    this function should not be made control-dependent on a different set of
+    values. For example, the intrinsic ``llvm.nvvm.barrier0`` is
+    ``convergent``, so calls to this intrinsic cannot be made control-dependent
+    on additional values.
 
     When it appears on a call/invoke, the ``convergent`` attribute indicates
     that we should treat the call as though we're calling a convergent


-------------- next part --------------
A non-text attachment was scrubbed...
Name: D150976.523806.patch
Type: text/x-patch
Size: 1520 bytes
Desc: not available
URL: <http://lists.llvm.org/pipermail/llvm-commits/attachments/20230519/4d237774/attachment.bin>


More information about the llvm-commits mailing list