RFR: 8351949: RISC-V: Cleanup and enable store-load peephole for membars [v8]

Hamlin Li mli at openjdk.org
Thu Apr 3 09:27:06 UTC 2025


On Thu, 3 Apr 2025 06:26:34 GMT, Robbin Ehn <rehn at openjdk.org> wrote:

>> src/hotspot/cpu/riscv/riscv.ad line 7951:
>> 
>>> 7949: %}
>>> 7950: 
>>> 7951: instruct unnecessary_membar_volatile_rvtso() %{
>> 
>> This one could be merged with `unnecessary_membar_volatile_rvwmo`, and remove the `UseZtso` in predicate.
>
> There are several more which can be merge, such as membar_volatile_rvXX.
> But I prefered having those for rvtso in one section and those for rvwmo in another section.
> That is not a good approach?

Seems to me it's better to merge these instruct. e..g when read the code, one needs to check what's the difference between these instructs, but found out they're exactly the same ones.
Maybe we could have 3 sections?

// RVTSO
...
// shared between RVTSO and RVWMO
...
// RVWMO
...

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

PR Review Comment: https://git.openjdk.org/jdk/pull/24035#discussion_r2026573726


More information about the hotspot-dev mailing list