Replace MemBarRelease for final field write with MemBarStoreStore

Andrew Haley aph at
Wed Sep 2 14:18:40 UTC 2015

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"


More information about the hotspot-compiler-dev mailing list