[PATCH] D62766: [Attributor] Deduce "nosync" function attribute.
Nicolai Hähnle via Phabricator via llvm-commits
llvm-commits at lists.llvm.org
Mon Jul 1 03:10:55 PDT 2019
nhaehnle added inline comments.
================
Comment at: llvm/docs/LangRef.rst:1481-1488
+``nosync``
+ This function attribute indicates that the function does not communicate
+ (synchronize) with another thread. By synchronization we mean that the function
+ does not access memory through non-relaxed atomic instructions or does not use
+ volatile acesses. This should be distinguished from cross-lane operations,
+ which could be interpreted as kind of synchronization is where threating it
+ as a memory dependence is not sufficient. If the function does ever synchronize
----------------
Thanks, I think this is better, but there are still some problems:
* There are no relaxed atomics in LLVM, only unordered, monotonic, and stronger orderings.
* What about fences?
I would put the part about cross-lane operations at the end and rephrase it slightly for clarity. Suggestion:
> This attribute is only concerned with synchronization through memory operations and is therefore orthogonal to cross-lane and convergent operations. In particular, an operation such as a barrier can be `convergent` but also `nosync`.
Assuming we can agree about the actual statement of that last sentence...
Repository:
rG LLVM Github Monorepo
CHANGES SINCE LAST ACTION
https://reviews.llvm.org/D62766/new/
https://reviews.llvm.org/D62766
More information about the llvm-commits
mailing list