[9] RFR(XS): 8176513 Poor code quality for ByteBuffers

Vladimir Ivanov vladimir.x.ivanov at oracle.com
Wed Mar 15 15:17:14 UTC 2017

I think alias_type->adr_type() should be used instead, because 
adr_type->isa_aryptr() is true for pointers into array header as well, 
but we care about array body here. Alias analysis should flatten them to 

Best regards,
Vladimir Ivanov

On 3/15/17 12:48 PM, Roland Westrelin wrote:
> http://cr.openjdk.java.net/~roland/8176513/webrev.01/
> This changes relaxes the condition under which MemBarCPUOrder nodes are
> added around unsafe accesses. If the object being accessed is an array
> and the access is mismatched, the current code add useless barriers
> (there's only one memory slice for the entire array so no risk of
> breaking alias analysis). If the base is not known to be not null,
> membars are added as well. These membars are not added for arrays in 8u
> and that hasn't caused any known problem. So in order to keep this
> change simple, we propose removing that condition (this was suggested by
> Vladimir Ivanov in the comments for this bug).
> Roland.

More information about the hotspot-compiler-dev mailing list