RFR: 8327963: C2: fix construction of memory graph around Initialize node to prevent incorrect execution if allocation is removed [v15]

Emanuel Peter epeter at openjdk.org
Fri Oct 24 10:41:17 UTC 2025


On Fri, 24 Oct 2025 10:18:04 GMT, Emanuel Peter <epeter at openjdk.org> wrote:

>> Roland Westrelin has updated the pull request incrementally with two additional commits since the last revision:
>> 
>>  - review
>>  - Roberto's patches
>
> src/hotspot/share/opto/macro.cpp line 1646:
> 
>> 1644:         return MultiNode::CONTINUE;
>> 1645:       };
>> 1646:       init->apply_to_projs(find_raw_mem, TypeFunc::Memory);
> 
> A "for each" with `void` return callback would reduce noise.

Alternatives:
- `init->unique_raw_mem_proj()`
- `init->unique_out(raw_mem_proj_predicate)` with boolean predicate.
Both of those would assert if we find multiple or none.

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

PR Review Comment: https://git.openjdk.org/jdk/pull/24570#discussion_r2459689999


More information about the hotspot-compiler-dev mailing list