[lworld+vector] RFR: 8304310: Initial compilers and runtime handling for multifield backed vectors. [v14]

Jatin Bhateja jbhateja at openjdk.org
Wed May 10 10:54:47 UTC 2023


On Wed, 10 May 2023 10:28:37 GMT, Jatin Bhateja <jbhateja at openjdk.org> wrote:

>> src/hotspot/share/opto/parse1.cpp line 924:
>> 
>>> 922:     kit.sync_jvms();
>>> 923:     Node* res = kit.argument(0);
>>> 924:     if (res->isa_InlineType() && VectorSupport::skip_value_scalarization(res->as_InlineType()->inline_klass()->get_InlineKlass())) {
>> 
>> I'm wondering if `tf()->returns_inline_type_as_fields()` in followed `else-if` branch has any connection with `ciInlineKlass::can_be_returned_as_fields()`.  If `ciInlineKlass::can_be_returned_as_fields()` can decide the result of `tf()->returns_inline_type_as_fields()`, then this special handling for bufferred `InlineTypeNode` can be removed like before?
>
> C2 always scalarizes value objects before returning it, for vector we current do not support scalarization hence I am returning the oop buffer of InlineTypeNode. Without this return value register mask may not comply with value being returned, this will specially be problematic when we return VectorPayloadMF* instances, it only has one field of type vector and return value mask expects a GPR.

BTW,  Valhalla  added a new return calling convention for inline types but it needs to be extended to cover vectors.
[https://github.com/openjdk/valhalla/blob/lworld/src/hotspot/cpu/x86/sharedRuntime_x86_64.cpp#L567](https://github.com/openjdk/valhalla/blob/lworld/src/hotspot/cpu/x86/sharedRuntime_x86_64.cpp#L567)

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

PR Review Comment: https://git.openjdk.org/valhalla/pull/833#discussion_r1189730320



More information about the valhalla-dev mailing list