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

Robbin Ehn rehn at openjdk.org
Wed Jul 3 06:34:20 UTC 2024


On Mon, 1 Jul 2024 14:32:03 GMT, Feilong Jiang <fjiang 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!

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

Marked as reviewed by rehn (Reviewer).

PR Review: https://git.openjdk.org/jdk/pull/19974#pullrequestreview-2155566884


More information about the hotspot-dev mailing list