RFR(XS): 8216549: Mismatched unsafe access to non escaping object fails

John Rose john.r.rose at oracle.com
Tue Jan 15 16:43:56 UTC 2019


On Jan 11, 2019, at 1:16 AM, Roland Westrelin <rwestrel at redhat.com> wrote:
> 
> I simply propose to make non escaping allocations with mismatched
> accesses to be non scalar replaceable.

That's a good fix for now.

At some point, we may want to make the JIT more lenient in Valhalla,
at least for value type buffers[1].  The reason is that there are legitimate
reasons to process a small value type of multiple small fields in terms of
a larger primitive type.  The reason I'm thinking of is vectorizing operations
like comparison and hash-code on the small value type.  When we get
Java-level support for vectors (Panama Vector API) some value type
operations can be handled in an operation or two on a single vector.

Example:  For `__ByValue class IntPair { int x, y; }`, the comparison operator
can perhaps be optimized (by a platform-specific binder) as a `long`
comparison, or an MMX comparison.

It's not a concern yet, but here's a little bookmark FTR, showing Mandy's
work on buffers…

— John

[1]: http://cr.openjdk.java.net/~mchung/valhalla/webrevs/unsafe/private-buffer.00/ <http://cr.openjdk.java.net/~mchung/valhalla/webrevs/unsafe/private-buffer.00/>

-------------- next part --------------
An HTML attachment was scrubbed...
URL: <https://mail.openjdk.java.net/pipermail/hotspot-compiler-dev/attachments/20190115/b7843ba7/attachment-0001.html>


More information about the hotspot-compiler-dev mailing list