[PATCH] D21723: [RFC] Enhance synchscope representation

Anastasia Stulova via Phabricator via llvm-commits llvm-commits at lists.llvm.org
Wed Jun 21 04:07:51 PDT 2017


Anastasia accepted this revision.
Anastasia added a comment.

LGTM from the OpenCL programming support side! Thanks!



================
Comment at: docs/LangRef.rst:2192
+``<target-scope>`` is a target specific synchronization scope, then it is target
+dependent if it *synchronizes with*, and participates in the seq\_cst total
+orderings of, other atomic operations.
----------------
t-tye wrote:
> Anastasia wrote:
> > Why is it only `seq_cst`? I am guessing the other ordering types (e.g. `acquire`/`release`) be used with the synchronization scopes too? I think this is a bit confusing here...
> This text was based on the style of writing used in the description for `singlethread` above. My interpretation of that text was that it is providing restrictions on the regular C++ memory model. So the manner in which the atomic interacts with the global sequential consistency ordering still holds (in other words an `acquire` or `release` does not interact with it, but a `seq_cst` does). Given the level of detail of this text it seemed reasonable as a user really needs to go read the formal definition of the memory models anyway to truly understand the semantics.
Yes, I though it was copied from the previous text. Perhaps over-complicating it with the ordering types of C++11 isn't a good idea indeed... although we could mention it briefly and add a reference.


https://reviews.llvm.org/D21723





More information about the llvm-commits mailing list