RFR: 8335411: RISC-V: Optimize encode_heap_oop when oop is not null

Feilong Jiang fjiang at openjdk.org
Wed Jul 3 12:14:25 UTC 2024


On Wed, 3 Jul 2024 06:31:38 GMT, Robbin Ehn <rehn at openjdk.org> wrote:

>> Hi, please review this enhancement that adds two more `encode_heap_oop_not_null` methods.
>> 
>> Currently, `encode_heap_oop` will check if the oop pointer is `null` at first. We can skip the null check of the oop to reduce the unnecessary branch instruction when encoding non-null oop pointer into compressed form.
>> 
>> 
>> Testing:
>> - [x] Tier1~3 on linux-riscv64 with release build
>> - [x] renaissance & dacapo benchmark suits for functionality
>
> Nice, thanks!

@robehn @RealFYang -- Thanks!

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

PR Comment: https://git.openjdk.org/jdk/pull/19974#issuecomment-2205930449


More information about the hotspot-dev mailing list