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

Quan Anh Mai qamai at openjdk.org
Mon Jan 27 10:04:54 UTC 2025


On Mon, 27 Jan 2025 09:51:01 GMT, Daniel Lundén <dlunden at openjdk.org> wrote:

>> @dlunde No I am just proposing a way to explain the correctness of your approach as currently I don't understand the invariants of the memory graph, the relation between the topology of the memory graph and the constraints on scheduling, and how our gcm algorithm can manage to impose such constraints.
>
> OK, I see, thanks for clarifying @merykitty. Then, to summarize, I believe that there should be an invariant for the memory graph at the point of `insert_anti_dependences` that for each load there can only be one valid memory input. If we would have such an invariant, the current algorithm is correct and finds all relevant anti-dependences.
> 
> The changeset I now propose is a local patch that deals with miscompilations that we now observe (and the patch is easy to backport). Hopefully, we can find some way to enforce the invariant above in a follow-up RFE. Let me know what you think.

@dlunde It would be great if you can write a formal proof regarding the points I made for the explanation in the code :)

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

PR Comment: https://git.openjdk.org/jdk/pull/22852#issuecomment-2615312073


More information about the hotspot-compiler-dev mailing list