[lworld] Integrated: 8364191: [lworld] Accesses to atomic flat fields prevent scalar replacement

Quan Anh Mai qamai at openjdk.org
Wed Oct 22 15:08:24 UTC 2025


On Mon, 28 Jul 2025 14:47:15 GMT, Quan Anh Mai <qamai at openjdk.org> wrote:

> Hi,
> 
> Flat accesses prevent scalar replacement because they are mismatched accesses. It is also generally not possible to look through them, because the payload may contain an oop in the form of raw bits. As a result, this PR adds `LoadFlatNode` and `StoreFlatNode`, which act as high-level abstractions for atomic accesses on flat fields. When it is determined that there is no racing access on the flat field (e.g. because the holder object does not escape), these flat access nodes can be expanded into multiple accesses to each flattened fields, otherwise, they will be expanded into a sequence of inferring a payload and accessing memory with that payload.
> 
> I also fix an issue with deoptimization reallocation where we miss assigning the null marker of elements in a nullable flat array.
> 
> Please take a look and leave your reviews, thanks a lot.

This pull request has now been integrated.

Changeset: 2f89dea3
Author:    Quan Anh Mai <qamai at openjdk.org>
URL:       https://git.openjdk.org/valhalla/commit/2f89dea3d37b51901aea5fe6a94965b4cd5810c7
Stats:     975 lines in 16 files changed: 764 ins; 188 del; 23 mod

8364191: [lworld] Accesses to atomic flat fields prevent scalar replacement

Reviewed-by: thartmann

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

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


More information about the valhalla-dev mailing list