[llvm] [LLVM] New NoDivergenceSource function attribute (PR #111832)
Nikita Popov via llvm-commits
llvm-commits at lists.llvm.org
Fri Oct 11 07:57:24 PDT 2024
================
@@ -2082,6 +2082,16 @@ example:
function call, use of ``longjmp``, or other means. It is a compiler hint that
is used at module level to improve dataflow analysis, dropped during linking,
and has no effect on functions defined in the current module.
+``nodivergencesource``
+ A call to this function is not a source of divergence. In uniformity
+ analysis, a *source of divergence* is an instruction that generates
+ divergence even if its inputs are uniform. A call with no further information
+ would normally be considered a source of divergence; setting this attribute
+ on a function means that a call to it is not a source of divergence.
+
+ This is useful where known-name calls are being used as an extension
+ mechanism for instructions, as for example in `llvm-dialects
+ <https://github.com/GPUOpen-Drivers/llvm-dialects>`.
----------------
nikic wrote:
Drop the last paragraph, it's more confusing than helpful, at least to me (what are known-name calls and what relation do they have to anything?)
https://github.com/llvm/llvm-project/pull/111832
More information about the llvm-commits
mailing list