Replace MemBarRelease for final field write with MemBarStoreStore

Vitaly Davidovich vitalyd at gmail.com
Wed Sep 2 14:20:20 UTC 2015


>
> AArch64 respects the dependence, as does AFAIK everything except the
> now-dead DEC Alpha, but it's clear that on the writer side a
> StoreStore alone isn't going to do it: "JSR 133 Cookbook only requires
> StoreStore, but might also require LoadStore barriers"


But Aleksey's explanation of why StoreStore isn't sufficient is basically
leaning on Hans' example, which in turns talks about not relying on
dependence.  But then we rely on dependence on the read side? It doesn't
make sense to me.

On Wed, Sep 2, 2015 at 10:18 AM, Andrew Haley <aph at redhat.com> wrote:

> On 09/02/2015 03:12 PM, Vitaly Davidovich wrote:
>
> > 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?
>
> AArch64 respects the dependence, as does AFAIK everything except the
> now-dead DEC Alpha, but it's clear that on the writer side a
> StoreStore alone isn't going to do it: "JSR 133 Cookbook only requires
> StoreStore, but might also require LoadStore barriers"
>
> Andrew.
>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://mail.openjdk.java.net/pipermail/hotspot-compiler-dev/attachments/20150902/b6602006/attachment.html>


More information about the hotspot-compiler-dev mailing list