RFR: 8350864: C2: verify structural invariants of the Ideal graph [v5]
Emanuel Peter
epeter at openjdk.org
Tue Sep 9 08:13:24 UTC 2025
On Tue, 9 Sep 2025 07:28:14 GMT, Marc Chevalier <mchevalier at openjdk.org> wrote:
>> src/hotspot/share/opto/graphInvariants.cpp line 45:
>>
>>> 43: }
>>> 44: }
>>> 45: }
>>
>> It seems you are assuming that all CFG nodes are reachable "from below".
>> That is true in most cases... but:
>> Have we not had this pesky case where we have a "infinite loop", where there is really no reachability from below, but from above it is reachable.
>>
>> See `_root_and_safepoints` in `PhaseCCP`. I'm not sure we need to worry about this, but I'd like to be sure that we have considered infinite loops here.
>>
>> The risk is that otherwise you just call those nodes dead, and do not verify them, right? Or you would just ignore failures there.
>
> I guess that is the risk, but I'm going from root, and follow the outputs, I'm checking reachability from above, no?
Never mind, I somehow did not look at this right. Sorry 🙈
-------------
PR Review Comment: https://git.openjdk.org/jdk/pull/26362#discussion_r2332431787
More information about the hotspot-compiler-dev
mailing list