[lworld] RFR: 8353432: [lworld] Deoptimization needs to handle nullable, flat fields in non-value class holders
Tobias Hartmann
thartmann at openjdk.org
Tue Jun 3 11:50:14 UTC 2025
On Sat, 31 May 2025 10:49:57 GMT, Quan Anh Mai <qamai at openjdk.org> wrote:
> I decide to change this to adding the null marker of a flat field right after all the subfields of it. It makes the shape similar to how we pass nullable flat fields in the ABI, as well as simplifies the implementation since we do not have to keep track of all null markers when traversing the object payload.
Yes, that's much cleaner. Thanks for the refactoring.
The fix looks good to me, I just added two comments.
src/hotspot/share/opto/macro.cpp line 602:
> 600: int nm_offset_in_element = offset_in_element + vk->null_marker_offset_in_payload();
> 601: const TypeAryPtr* nm_adr_type = elem_adr_type->with_field_offset(nm_offset_in_element);
> 602: Node* value = value_from_mem(mem, ctl, T_BOOLEAN, TypeInt::BOOL, nm_adr_type, alloc);
What if `value_from_mem` fails and returns `nullptr`?
src/hotspot/share/opto/type.cpp line 3870:
> 3868: field_bt = T_BOOLEAN;
> 3869: }
> 3870: _is_ptr_to_narrowoop = UseCompressedOops && ::is_reference_type(field_bt);\
Suggestion:
_is_ptr_to_narrowoop = UseCompressedOops && ::is_reference_type(field_bt);
-------------
Marked as reviewed by thartmann (Committer).
PR Review: https://git.openjdk.org/valhalla/pull/1478#pullrequestreview-2891921248
PR Review Comment: https://git.openjdk.org/valhalla/pull/1478#discussion_r2123532080
PR Review Comment: https://git.openjdk.org/valhalla/pull/1478#discussion_r2123547928
More information about the valhalla-dev
mailing list