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:13:37 UTC 2025


On Mon, 23 Dec 2024 11:03:17 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
>
> src/hotspot/share/opto/gcm.cpp line 788:
> 
>> 786:       }
>> 787:       for (uint i = 0; i < b->number_of_nodes(); ++i) {
>> 788:         Node* n = b->get_node(i);
> 
> For sanity (and efficiency), we might want to (in a separate RFE, and if at all possible) make GCM insert Phi nodes to blocks before any Mach node, and add an early break here. Meanwhile, could you add a comment here explaining that we have to traverse the entire block because Phi nodes might be interleaved with Mach nodes as LCM may not have run yet?

Sure, I've now added a comment. It seems that Phi nodes are usually predictably located close to the beginning of blocks, but there are exceptions. Sounds good to investigate separately, I'll create an RFE.

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

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


More information about the hotspot-compiler-dev mailing list