Hello,

This is (yet another) cleanup to remove redundant memory barriers after the new 
ValuePayload abstraction API in the runtime. The ValuePayload API's (including 
FlatValuePayload::read) does the necessary calls to order stores of the copy 
before the oop is published (OrderAccess::storestore), making the 
platform-specific memory barriers redundant.

I don't have hardware access to RISCV or PPC, but looking at the runtime 
implementations of OrderAccess::storestore, they achieve the same thing as the 
platform-specific memory barriers that I suggest we remove in this PR. GHA will 
show that this compiles at least.

`membar(Assembler::StoreStore | Assembler::LoadLoad);` and 
`OrderAccess::storestore()` both boil down to `lwsync`.

The C1 call to `load_flat_array` already omits the memory barrier, so we don't 
need to remove it here.

Testing:
* Oracle's tier1-3 linux-aarch64
* GHA

---------
- [x] I confirm that I make this contribution in accordance with the [OpenJDK 
Interim AI Policy](https://openjdk.org/legal/ai).

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

Commit messages:
 - 8386889: [lworld] Redundant StoreStore membar after FlatValuePayload::read

Changes: https://git.openjdk.org/valhalla/pull/2581/files
  Webrev: https://webrevs.openjdk.org/?repo=valhalla&pr=2581&range=00
  Issue: https://bugs.openjdk.org/browse/JDK-8386889
  Stats: 12 lines in 6 files changed: 0 ins; 12 del; 0 mod
  Patch: https://git.openjdk.org/valhalla/pull/2581.diff
  Fetch: git fetch https://git.openjdk.org/valhalla.git pull/2581/head:pull/2581

PR: https://git.openjdk.org/valhalla/pull/2581

Reply via email to