Replace MemBarRelease for final field write with MemBarStoreStore

Andrew Haley aph at
Thu Sep 3 15:28:09 UTC 2015

On 09/03/2015 04:21 PM, Hui Shi wrote:

> Breaking dependency between final stores and loads it depends on
> introduce loadstore barrier. To solve similar corner cases, JIT need
> ensure no final stores's depended load is reordered with store in
> JIT optimization. Then JIT can weakening Memory Barrier here. This
> has some chance to missing optimization for final store, but is
> worthwhile on RMO platform like aarch64.

Well, maybe, maybe not.  It all depends on how efficient loadstore
barriers are, and how useful the optimizations in question are.  At
the present time it makes the most sense for programmers to say what
we mean and encourage hardware designers to make barriers more
efficient.  We have already come a long way, and IMO it doesn't make a
huge amount of sense right now to nit-pick the finer details of memory
barrier optimizations but to be conservative.


More information about the hotspot-compiler-dev mailing list