RFR: 8333393: PhaseCFG::insert_anti_dependences can fail to raise LCAs and to add necessary anti-dependence edges [v13]

Daniel Lundén dlunden at openjdk.org
Tue Feb 18 12:44:31 UTC 2025


On Tue, 11 Feb 2025 18:51:10 GMT, Daniel Lundén <dlunden at openjdk.org> wrote:

>>> It does look like the problematic memory subgraph results due to loop peeling
>> 
>> OK, that sounds promising! Maybe it is indeed possible to make peeling/cloning maintain our invariant right from the start, and hope (and verify) it is not broken by other transformations. Up to you whether to integrate this point fix and continue your investigation separately or wait until you have explored along this line before integration.
>> 
>>> Sounds like a great idea, but I think we need to discuss the details further first. It is not quite clear to me yet what it is we want to assert.
>> 
>> Right, the details are not obvious to me either, it would probably require some exploration before we can formalize what it is exactly that we want to verify, since there is no specification (as far as I know) of what is expected for the memory subgraph in terms of liveness and interference.
>
>> Up to you whether to integrate this point fix and continue your investigation separately or wait until you have explored along this line before integration.
> 
> I have considered and implemented a couple of alternative fixes today, but they are not really more elegant than the fix in this PR. If I want to fix the memory graph at loop cloning, what I'm really doing is duplicating the Phi idealization that we already have. So, then I think it would make most sense to work out the combinatorial issues with option 2 that I posted above (for making the Phi idealization less restrictive). I'm leaning towards integrating this for now, but will explore a bit further first.
> 
>> Right, the details are not obvious to me either, it would probably require some exploration before we can formalize what it is exactly that we want to verify, since there is no specification (as far as I know) of what is expected for the memory subgraph in terms of liveness and interference.
> 
> Let's discuss this offline!

I have managed to make the split-through-MergeMem Phi idealization discussed above less conservative. From the perspective of the current issue, it is still a point fix, but a more elegant one. Because of this, I'm closing this PR and will open a new PR with the new fix. Thanks for the reviews again. I'll ping everyone involved in the new PR as well.

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

PR Review Comment: https://git.openjdk.org/jdk/pull/22852#discussion_r1959674237


More information about the hotspot-compiler-dev mailing list