RFR: 8351140: RISC-V: Intrinsify Unsafe::setMemory

Martin Doerr mdoerr at openjdk.org
Thu Mar 27 10:24:12 UTC 2025


On Wed, 26 Mar 2025 16:34:58 GMT, Martin Doerr <mdoerr at openjdk.org> wrote:

>> From [JDK-8329331](https://bugs.openjdk.org/browse/JDK-8329331), add riscv unsafe::setMemory intrinsic’s generator generate_unsafe_setmemory. This intrinsic optimizes about 15%-20% unsafe setmemory time
>
> You may want to use `UnsafeMemoryAccessMark` as on x86.

> @TheRealMDoerr Thanks for your kindly reply. I found that the main logic on the x86 is in 'generate_unsafe_setmemory' function, while the main logic on the riscv and aarch64 is in generate_fill. I have not found 'UnsafeMemoryAccess' on aarch64 in generate_fill, I will check whether we need to add it and where to insert it if needed on riscv.

Note that generate_fill is normally not used for Unsafe accesses and hence doesn't need 'UnsafeMemoryAccessMark'. I'm using it a bit differently here: https://github.com/openjdk/jdk/pull/24254

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

PR Comment: https://git.openjdk.org/jdk/pull/23890#issuecomment-2757508131


More information about the hotspot-compiler-dev mailing list