[9] RFR (XS): 8155635: C2: assert(flat != TypePtr::BOTTOM) failed: cannot alias-analyze an untyped ptr
Vladimir Ivanov
vladimir.x.ivanov at oracle.com
Fri Apr 29 23:11:49 UTC 2016
http://cr.openjdk.java.net/~vlivanov/8155635/webrev.00/
https://bugs.openjdk.java.net/browse/JDK-8155635
SplitIf transformation can produce untyped pointers when slitting AddP
nodes for unsafe accesses through a Phi which merges non-null & null values:
AddP ... (Phi (ConP #NULL) (CheckCastPP Oop:...:NotNull))
Proposed fix is to enable oop pointer to raw pointer conversion for
absolute addresses.
I also experimented with blocking SplitIf transformation is such cases,
but the transformation seems viable and considerably simplifies the
graph: X-shaped control flow is untangled by eliminating redundant and
the transformation sharpens types on both branches.
I checked specifically how Phi merges raw & oop pointers after the split
and it works fine.
Testing: failing test, JPRT, RBT (hs-tier0-comp.js).
Thanks!
Best regards,
Vladimir Ivanov
PS: though AddP (Phi #NULL #NotNull) shape is common, I wasn't able to
write a simplified test case which triggers SplitIf transformation.
More information about the hotspot-compiler-dev
mailing list