RFR: 8327963: C2: fix construction of memory graph around Initialize node to prevent incorrect execution if allocation is removed [v16]
Emanuel Peter
epeter at openjdk.org
Tue Oct 28 17:13:03 UTC 2025
On Tue, 28 Oct 2025 16:59:41 GMT, Emanuel Peter <epeter at openjdk.org> wrote:
>> src/hotspot/share/opto/memnode.hpp line 1428:
>>
>>> 1426: template <class Callback> NarrowMemProjNode* apply_to_narrow_mem_projs(DUIterator& i, Callback callback) const {
>>> 1427: return apply_to_narrow_mem_projs_any_iterator<Callback, UsesIterator>(UsesIterator(i, this), callback);
>>> 1428: }
>>
>> Is this one still needed?
>
> It also seems that the upper two can be merged. Maybe all "overloadings" of `apply_to_narrow_mem_projs` can be merged, no? Or are there really multiple uses?
Basically we could call `apply_to_narrow_mem_projs_any_iterator` directly from the two uses:
- `already_has_narrow_mem_proj_with_adr_type`
- `for_each_narrow_mem_proj_with_new_uses`
-------------
PR Review Comment: https://git.openjdk.org/jdk/pull/24570#discussion_r2470355697
More information about the hotspot-compiler-dev
mailing list