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

Robbin Ehn rehn at openjdk.org
Fri Mar 14 07:51:54 UTC 2025


On Fri, 14 Mar 2025 07:19:55 GMT, Fei Yang <fyang at openjdk.org> wrote:

> Hi, I am trying to understand this. What's the Java source code look like regarding the first table showing the difference in JIT code in PR description?
> 

Thank you for having a look.

Do this help ?

volatile int v_a;
volatile int v_b;
int plain_c;

int temp_a = v_a;
v_b = 77;
plain_c = 66; // Non-volatile store between two volatile stores.
v_a = 88;
int temp_b = v_b;


The peephole is very powerful on tso, as we only care about store-load.
But it do improve some cases on rvwmo also, hence I enabled it on both.

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

PR Comment: https://git.openjdk.org/jdk/pull/24035#issuecomment-2723892647


More information about the hotspot-dev mailing list