[lworld] RFR: 8278390: [lworld] Scalarization of nullable inline types in the calling convention [v2]
Tobias Hartmann
thartmann at openjdk.java.net
Fri Apr 22 09:26:56 UTC 2022
On Thu, 21 Apr 2022 14:35:32 GMT, Frederic Parain <fparain at openjdk.org> wrote:
>> Tobias Hartmann has updated the pull request incrementally with one additional commit since the last revision:
>>
>> equal -> zero cleanup
>
> src/hotspot/cpu/x86/interp_masm_x86.cpp line 1179:
>
>> 1177:
>> 1178: if (state == atos && InlineTypeReturnedAsFields) {
>> 1179: // Check if we are returning an inline type and load its fields into registers
>
> Suggestion:
> // Check if we are returning an non-null inline type and load its fields into registers
Thanks, fixed.
> src/hotspot/share/runtime/sharedRuntime.cpp line 2975:
>
>> 2973: InlineKlass* vk = ss.as_inline_klass(holder);
>> 2974: // TODO 8284443 Mismatch handling, we need to check parent method args (look at klassVtable::needs_new_vtable_entry)
>> 2975: if (vk != NULL && (bt == T_PRIMITIVE_OBJECT || holder->is_preload_class(vk->name())) &&
>
> Limiting argument scalarization to value classes present in the PreLoad attribute could lead to missed opportunities of scalarize if the class was loaded but not in the attribute (incomplete or missing PreLoad attributer case). The calling convention could instead look at which classes are loaded with no consideration to what triggered the loading. This would force overriding methods to look directly at the calling convention of the overridden method instead of looking at its context (lines 2861, 2882).
> But this is a work that should be done when dealing with calling conventions mismatches (JDK-8284443).
Yes, good point. As we discussed off-thread, I'll take care of this with JDK-8284443.
-------------
PR: https://git.openjdk.java.net/valhalla/pull/685
More information about the valhalla-dev
mailing list