RFR: Fix C2 intrinsics barriers

Roman Kennke rkennke at redhat.com
Thu Sep 13 12:24:41 UTC 2018


> 
>> - two other instances seem to require explicit barriers even though
>> make_unsafe_addr() should already insert them. Possible that the
>> verifier is too strict here. Re-inserted those explicit barriers with
>> comment. We should check what's up there
> 
> make_unsafe_addr() only adds barriers for cases where we can't say
> whether the access is on heap or not. Otherwise access_load/access_store
> take care of the barriers. For these 2 intrinsics, there's only a
> runtime call.
> 
> Roland.
> 

Right! So this is a bit stupid still: if it can't say if it's on heap or
not, it would add barriers 2x. It would probably not actually do that
because barrier optimization elides chained barriers. But it's still not
perfectly clean ;-)

I'll upstream those missing barriers then, together with some others,
the messed-up arraycopy barrier and the obj-equals barriers.

Thanks, Roman



More information about the shenandoah-dev mailing list