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
Thu Jan 9 16:56:39 UTC 2025


On Thu, 9 Jan 2025 12:48:30 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 789:
> 
>> 787:     // initial_mem_block->_idom). The loop below always terminates because the
>> 788:     // root block strictly dominates initial_mem_block.
>> 789:     while (b != initial_mem_block->_idom) {
> 
> Could you write a `for` instead?
> `for(Block* b = early; b != initial_mem_block->_idom; b = b->_idom) {`
> 
> Having the initial, exit-check and iteration-step together makes it a little more readable, I think.

Sure, sounds good. I'll update it.

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

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


More information about the hotspot-compiler-dev mailing list