Release store in C2 putfield

Vitaly Davidovich vitalyd at gmail.com
Wed Sep 3 16:54:07 UTC 2014


Also I thought the memord recorded in the node (also) prevents compiler
from reordering the stores.  So even if AArch64 cpu doesn't reorder, what
would prevent compiler reordering?

Sent from my phone
On Sep 3, 2014 12:49 PM, "Aleksey Shipilev" <aleksey.shipilev at oracle.com>
wrote:

> Hi Andrew,
>
> On 09/03/2014 06:16 PM, Andrew Haley wrote:
> > In Parse::do_put_xxx, I see
> >
> >   const MemNode::MemOrd mo =
> >     is_vol ?
> >     // Volatile fields need releasing stores.
> >     MemNode::release :
> >     // Non-volatile fields also need releasing stores if they hold an
> >     // object reference, because the object reference might point to
> >     // a freshly created object.
> >     StoreNode::release_if_reference(bt);
> >
> > AArch64 doesn't need a release store here: its memory guarantees are
> > strong enough that a simple store is sufficient.  But my question is
> > not about that, but how to handle it properly.
>
> I can't answer the question you posed, but let me challenge your premise.
>
> Why is a simple store is sufficient here for AArch64? Do the stores
> ordered on AArch64 (I thought not)? I thought the "RC" part in "RCsc"
> only applies to explicit synchronization instructions.
>
> -Aleksey.
>
>


More information about the hotspot-dev mailing list