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

Jatin Bhateja jbhateja at openjdk.org
Wed Mar 26 03:21:14 UTC 2025


On Sun, 23 Mar 2025 17:21:15 GMT, Quan Anh Mai <qamai at openjdk.org> wrote:

> Hi,
> 
> As a step of #1405, I would like to remove the usage of larval value objects in `Unsafe` intrinsics. This patch also tries to make sure that `Unsafe::makePrivateBuffer` and `Unsafe::finishPrivateBuffer` are always inlined, so that larval objects do not cross call boundaries except for invoking object constructors.
> 
> Please take a look and review this PR, thanks a lot.

src/hotspot/share/opto/doCall.cpp line 156:

> 154:     CallGenerator* cg = find_intrinsic(callee, call_does_dispatch);
> 155: 
> 156:     if (cg == nullptr) {

Please add comment when will cg be null in this context.

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

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

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


More information about the valhalla-dev mailing list