[lworld] RFR: 8352647: [lworld] Remove larval InlineTypeNode in Unsafe intrinsics [v2]

Quan Anh Mai qamai at openjdk.org
Wed Mar 26 14:14:16 UTC 2025


On Wed, 26 Mar 2025 03:16:29 GMT, Jatin Bhateja <jbhateja at openjdk.org> wrote:

>> src/hotspot/share/opto/library_call.cpp line 2685:
>> 
>>> 2683:   ciInlineKlass* vk = type->inline_klass();
>>> 2684:   Node* klass = makecon(TypeKlassPtr::make(vk));
>>> 2685:   Node* obj = new_instance(klass);
>> 
>> We have adpoted a similar strategy in lworld-vector 
>> 
>> https://github.com/openjdk/valhalla/blob/lworld%2Bvector/src/hotspot/share/opto/inlinetypenode.cpp#L1071
>
> We should also emit the IR to mark the larval bit in the object header.
> https://github.com/openjdk/valhalla/blob/lworld%2Bvector/src/hotspot/share/opto/inlinetypenode.cpp#L1075

Thanks for noticing, I forgot about that, I believe setting the `_larval` field in the corresponding `AllocateNode` is adequate, since macro expansion will do the right thing. I also add code to unset the larval bit in `finishPrivateBuffer`.

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

PR Review Comment: https://git.openjdk.org/valhalla/pull/1406#discussion_r2014241292


More information about the valhalla-dev mailing list