RFR: 8351568: Improve source code documentation for PhaseCFG::insert_anti_dependences [v6]

Daniel Lundén dlunden at openjdk.org
Thu May 15 09:05:00 UTC 2025


On Mon, 12 May 2025 11:39:28 GMT, Christian Hagedorn <chagedorn at openjdk.org> wrote:

>> Daniel Lundén has updated the pull request incrementally with one additional commit since the last revision:
>> 
>>   Update src/hotspot/share/opto/gcm.cpp
>>   
>>   Co-authored-by: Roberto Castañeda Lozano <robcasloz at users.noreply.github.com>
>
> src/hotspot/share/opto/gcm.cpp line 685:
> 
>> 683: // path relative to the load if there are no paths from early to LCA that go
>> 684: // through the store's block. Such stores are not anti-dependent, and there is
>> 685: // no need to update the LCA nor to add anti-dependence edges.
> 
> Suggestion:
> 
> // no need to update the load's LCA nor to add anti-dependence edges.

For consistency, we would need to then also change "the LCA" to "the load's LCA" in many more places throughout the method, which increases verbosity. Is it not OK to simply use "LCA", since we have defined that this is the load's LCA at the start? We don't mention any other LCAs, so I don't think there'll be any confusion.

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

PR Review Comment: https://git.openjdk.org/jdk/pull/24926#discussion_r2090665625


More information about the hotspot-compiler-dev mailing list