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

Roland Westrelin roland at openjdk.org
Fri Sep 12 07:30:29 UTC 2025


On Fri, 12 Sep 2025 01:00:20 GMT, Dean Long <dlong at openjdk.org> wrote:

>> Roland Westrelin has updated the pull request with a new target base due to a merge or a rebase. The pull request now contains 45 commits:
>> 
>>  - more
>>  - Merge branch 'master' into JDK-8327963
>>  - more
>>  - more
>>  - Merge branch 'master' into JDK-8327963
>>  - more
>>  - more
>>  - lambda return
>>  - lambda clean up
>>  - Merge branch 'master' into JDK-8327963
>>  - ... and 35 more: https://git.openjdk.org/jdk/compare/e16c5100...b701d03e
>
> src/hotspot/share/opto/loopTransform.cpp line 3992:
> 
>> 3990:   Node* frame = new ParmNode(C->start(), TypeFunc::FramePtr);
>> 3991:   _igvn.register_new_node_with_optimizer(frame);
>> 3992:   call->init_req(TypeFunc::FramePtr,  frame);
> 
> This seems unrelated.  Is it needed?

It's one of the things mentioned in that comment:
https://github.com/openjdk/jdk/pull/24570#issuecomment-2883651987

"I added asserts to catch cases where proj_out is called but the node has more than one matching projection. With those asserts, I caught some false positive/cases where we got lucky and worked around them by reworking the code so it doesn't use proj_out. That's the case in PhaseIdealLoop::intrinsify_fill(): we can end up there with more than one FramePtr projection because the code pattern used elsewhere is to add one more projection and let identical projections common during igvn. "

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

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


More information about the hotspot-compiler-dev mailing list