RFR(XS) 8178047: Aliasing problem with raw memory accesses
Vladimir Kozlov
vladimir.kozlov at oracle.com
Fri Apr 14 16:53:05 UTC 2017
Klass pointers should be also fine I think.
The problem is only Raw pointers which could point to the same memory but different offset.
May be use
bool is_raw = adr->bottom_type()->isa_rawptr() != NULL;
...
if (is_raw && st_base != base) {
Also what if pointer type is mixed: original is oop and mem node is raw?
May we should check that if when one of them is raw we should compare bases.
Thanks,
Vladimir
On 4/13/17 8:30 PM, Igor Veresov wrote:
> This seems like a long-standing bug. Analysis in MemNode::find_previous_store() tries to relax memory dependencies by proving that memory accesses don’t alias. The code is fine for oops: if [offset, offset+length) intervals don’t overlap it proves the accesses don’t alias because bases always point to the start of an object. For raw accesses that’s not true. Offset analysis doesn’t mean much without proving that bases are not the same.
>
> Webrev: http://cr.openjdk.java.net/~iveresov/8178047/webrev.00
>
> Thanks,
> igor
>
More information about the hotspot-compiler-dev
mailing list