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

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


On Thu, 15 May 2025 09:16:58 GMT, Daniel Lundén <dlunden at openjdk.org> wrote:

>> src/hotspot/share/opto/gcm.cpp line 762:
>> 
>>> 760:   // and other inputs are first available.  (Computed by schedule_early.)
>>> 761:   // For normal loads, 'early' is the shallowest place (dom graph wise)
>>> 762:   // to look for anti-deps between this load and any store.
>> 
>> Just noticed when reading through the method. Cannot suggest since it's hidden:
>> L766-768: 
>> - different than the schedule_early block in that it could be -> different from the schedule_early block when it is
>> - anti-dependences -> anti-dependencies.
>
> A note on "dependencies" and "dependences": these are plural forms of "dependency" and "dependence", respectively. From what I can tell, the terms can be used more or less interchangeably, but there are some subtle differences. I will not advocate for one or the other, but as can be seen from the method name itself, other related method names, and pre-existing source code comments, the currently chosen term is "dependence". The plural is therefore "dependences", and not "dependencies".

> * different than the schedule_early block in that it could be -> different from the schedule_early block when it is

Thanks, fixed!

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

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


More information about the hotspot-compiler-dev mailing list