On Wed, 3 Jun 2026 16:02:40 GMT, Vladimir Kozlov <[email protected]> wrote:

>> Roland Westrelin has updated the pull request incrementally with one 
>> additional commit since the last revision:
>> 
>>   review
>
> src/hotspot/share/opto/escape.cpp line 4537:
> 
>> 4535: 
>> 4536: bool ConnectionGraph::flat_access_aliases_with(Node* flat_access, 
>> const TypeOopPtr *toop) {
>> 4537:   Node* base = flat_access->is_StoreFlat() ? 
>> flat_access->as_StoreFlat()->base() : flat_access->as_LoadFlat()->base();
> 
> What type of `base` node could be here?

`base` can be anything that's a pointer (at offset 0) but not an `AddP`.

> src/hotspot/share/opto/escape.cpp line 4651:
> 
>> 4649:         // ConnectionGraph::optimize_flat_accesses() and has no effect 
>> on the memory state
>> 4650:         // - or it is a LoadFlat for some object unrelated to alias_idx
>> 4651:         // In both cases, it's safe to assume this LoadFlat doesn't 
>> modify the memory for alias_idx
> 
> Which flat load can modify memory?  I surprise that this node has Memory 
> projection.

Whey they are expanded they need memory barriers which is why I think they have 
a memory projection. If the `LoadFlat` is from a non escaping object, then it 
doesn't need memory barriers when it's expanded AFAIU.

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

PR Review Comment: 
https://git.openjdk.org/valhalla/pull/2489#discussion_r3357114323
PR Review Comment: 
https://git.openjdk.org/valhalla/pull/2489#discussion_r3357128995

Reply via email to