Replace MemBarRelease for final field write with MemBarStoreStore
Vitaly Davidovich
vitalyd at gmail.com
Wed Sep 2 14:12:24 UTC 2015
It seems Aleksey's article is at odds with Hans' article. Specifically,
Hans talks about the case (which Aleksey alludes to as well):
x.a = 42;
x.a++;
<store_store>
Hans mentions that x.a load can move past the store_store barrier despite
there being a dependence (i.e. we shouldn't rely on dependence). Aleksey
then states the following when talking about the read side:
Turns out, most hardware also respects the order of so-called 'dependent'
> reads, and hence does not require emitting the barrier there.
So which is it?
On Wed, Sep 2, 2015 at 9:58 AM, Andrew Haley <aph at redhat.com> wrote:
> On 09/02/2015 02:55 PM, Vitaly Davidovich wrote:
> > Probably not. See http://www.hboehm.info/c++mm/no_write_fences.html
> > for an explanation.
> >
> > Is that really relevant to final/stable field writes though?
>
> I believe so. See also
> http://shipilev.net/blog/2014/all-fields-are-final/,
> "Implementation Support"
>
> Andrew.
>
>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://mail.openjdk.java.net/pipermail/hotspot-compiler-dev/attachments/20150902/92d9fede/attachment.html>
More information about the hotspot-compiler-dev
mailing list