[lworld] RFR: 8328329: [lworld] Optimize field type checking sequence for x86 target.
Quan Anh Mai
qamai at openjdk.org
Mon Mar 18 09:48:01 UTC 2024
On Mon, 18 Mar 2024 07:52:30 GMT, Jatin Bhateja <jbhateja at openjdk.org> wrote:
> - For field access bytecodes (getfield / putfield) interpreter perform special handling for flat / null restricted fields.
> - Patch replaces existing flag checking sequence with efficient sequence based on 'bt' instruction.
>
> Kindly review and approve.
>
> Best Regards,
> Jatin
src/hotspot/cpu/x86/macroAssembler_x86.cpp line 3006:
> 3004: movl(temp_reg, flags);
> 3005: btl(temp_reg, ResolvedFieldEntry::is_null_free_inline_type_shift);
> 3006: jcc(Assembler::carrySet, is_null_free_inline_type);
You also do not need `temp_reg`. Also, I think `testl(flags, 1 << ResolvedFieldEntry::is_null_free_inline_type_shift)` would be better than `btl` since `test` can macro-fuse with `jcc`.
-------------
PR Review Comment: https://git.openjdk.org/valhalla/pull/1051#discussion_r1528213114
More information about the valhalla-dev
mailing list