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


On Mon, 23 Dec 2024 10:52: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
>
> src/hotspot/share/opto/gcm.cpp line 773:
> 
>> 771:   worklist_def_use_mem_states.push(nullptr, initial_mem);
>> 772:   Block* initial_mem_block = get_block_for_node(initial_mem);
>> 773:   if (load->in(0) && initial_mem_block != nullptr) {
> 
> What would be the conditions needed for `initial_mem_block == nullptr`? (I did a quick run with an additional assertion and could not find any). It would be great to narrow down this to understand better the completeness of the fix and convince ourselves we are not leaving interesting cases unaddressed.

This was more of a sanity check, because I did notice memory nodes without a block elsewhere in the graph at this stage of compilation. But, you are right. It seems initial memory for loads here always have a block. I replaced the check with an assert and reran tests, and it looks fine.

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

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


More information about the hotspot-compiler-dev mailing list