[PATCH] D21723: [RFC] Enhance synchscope representation

Sanjoy Das via Phabricator via llvm-commits llvm-commits at lists.llvm.org
Mon Jun 5 13:04:29 PDT 2017


sanjoy added inline comments.


================
Comment at: docs/LangRef.rst:2192
+``<target-scope>`` is a target specific synchronization scope, then it is target
+dependent if it definitely does, definitely does not, or maybe
+*synchronizes with*, and participates in the seq\_cst total orderings of, other
----------------
t-tye wrote:
> sanjoy wrote:
> > This middle paragraph was not clear to me.  Are you trying to say that given two atomic operations `op0` marked with `syncscope("scope-0")` and `op1` marked with `syncscope("scope-1")`, whether they synchronize or not is a target  specific function of `"scope-0"` and `"scope-1"`?  If so, why not say just that?
> > 
> It is actually also target dependent even if `scope-0` is the same as `scope-1`. The intend of the text was to convey that it may be possible to determine if two atomic operations definitely do synchronize, definitely do not, or may synchronize as suggested by @mehdi_amini in an earlier comment.
> 
> However, would the following be better?
> 
> ```
> If an atomic operation is marked ``syncscope("<target-scope>")``, where
> ``<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.
> ```
> 
That sounds better to me.

I'd also like you to please clarify what exactly you mean by "synchronizes with" -- is this the "synchronizes with" relation used in the C++ memory model or something different?


https://reviews.llvm.org/D21723





More information about the llvm-commits mailing list