RFR: 8333393: PhaseCFG::insert_anti_dependences can fail to raise LCAs and to add necessary anti-dependence edges [v2]
Daniel Lundén
dlunden at openjdk.org
Tue Jan 7 18:03:21 UTC 2025
On Mon, 23 Dec 2024 11:10:35 GMT, Roberto Castañeda Lozano <rcastanedalo at openjdk.org> wrote:
>> Daniel Lundén has updated the pull request incrementally with one additional commit since the last revision:
>>
>> Updates after comments
>
> Good analysis, Daniel! Given the presence of overlapping memory phis (memory phis that are placed in the same block and include aliasing memory slices), the general idea of this fix seems reasonable to me. As a more fundamental solution, it would be worth investigating (perhaps separately) the root cause of this overlap and exploring whether it is feasible to enforce disjointness (an invariant apparently assumed by the original `PhaseCFG::insert_anti_dependences` algorithm), at least during code generation.
>
> Does the comment above the definition of `initial_mem` require any update as part of this change?
Thanks for the review @robcasloz!
> Given the presence of overlapping memory phis (memory phis that are placed in the same block and include aliasing memory slices), the general idea of this fix seems reasonable to me. As a more fundamental solution, it would be worth investigating (perhaps separately) the root cause of this overlap and exploring whether it is feasible to enforce disjointness (an invariant apparently assumed by the original PhaseCFG::insert_anti_dependences algorithm), at least during code generation.
Yes, I think it could be useful to investigate further. Based on my observations while working on this issue, the overlapping memory Phis likely result from loop peeling. However, the Phi overlap is not the sole cause of this issue, as the second example demonstrates. I suggest we write an RFE and investigate in a separate issue.
> Does the comment above the definition of initial_mem require any update as part of this change?
Yes, thanks. Added now.
-------------
PR Comment: https://git.openjdk.org/jdk/pull/22852#issuecomment-2575915756
More information about the hotspot-compiler-dev
mailing list