[lworld+vector] RFR: 8319972: [lworld+vector] Enable intrinsification of Unsafe.finishPrivateBuffer. [v3]

Jatin Bhateja jbhateja at openjdk.org
Wed Nov 22 07:41:36 UTC 2023


On Wed, 22 Nov 2023 06:34:26 GMT, Xiaohong Gong <xgong at openjdk.org> wrote:

>> src/hotspot/share/opto/inlinetypenode.cpp line 1024:
>> 
>>> 1022: 
>>> 1023:   store(kit, alloc_oop, alloc_oop, vk);
>>> 1024:   return alloc_oop;
>> 
>> Why not setting the oop to allocated buffer and return the `InlineTypeNode` ? We may have optimizations for Unsafe access for `InlineTypeNode` input.
>
> Any feedback on this please?

The whole idea is to avoid scalarization for value objects in laval state and not construct InlineTypeNode till we encounter a finishPrivateBuffer. A value object is transitioned into larval state to make it mutable, since Unsafe.put* APIs do not modify the JVM state hence to be safe it's better to keep value objects as oops b/w make and finish private buffer, patch also disables re-materialization of InlineTypeNode from updated memory state in Unsafe.put* inline expanders.

-------------

PR Review Comment: https://git.openjdk.org/valhalla/pull/952#discussion_r1401622841



More information about the valhalla-dev mailing list