RFR: 8333393: PhaseCFG::insert_anti_dependences can fail to raise LCAs and to add necessary anti-dependence edges [v2]
Emanuel Peter
epeter at openjdk.org
Wed Jan 8 14:11:46 UTC 2025
On Wed, 8 Jan 2025 14:00:24 GMT, Emanuel Peter <epeter at openjdk.org> wrote:
>> Daniel Lundén has updated the pull request incrementally with one additional commit since the last revision:
>>
>> Updates after comments
>
> src/hotspot/share/opto/gcm.cpp line 757:
>
>> 755: // In some cases, there are other relevant initial memory states besides
>> 756: // initial_mem. In such cases, we are rather dealing with multiple trees and
>> 757: // their fringes.
>
> If I look at these comments here (I reviewed a change by Roland a few months back, so my memory is coming back)...
> I see that the load is supposed to be scheduled before any `Memory state modifying nodes include Store and Phi` that is (transitively via any MergeMem) below the `initial_mem`.
>
> In you example1, why do we therefore not put an anti-dependency edge betweeen the `183 load`, and the `106 Phi`? Would that not be enough to ensure the load is scheduled before the other memory affecting nodes further below `106 Phi`?
>
> Or is the issue that this traversal is somehow restricted to blocks - I don't remember that from last time...
> I'll keep reading the changes now.
And in example 2, we should schedule before the Phi as well:

Why don't we do that?
-------------
PR Review Comment: https://git.openjdk.org/jdk/pull/22852#discussion_r1907242566
More information about the hotspot-compiler-dev
mailing list