RFR: 8350864: C2: verify structural invariants of the Ideal graph [v3]

Marc Chevalier mchevalier at openjdk.org
Thu Sep 4 08:53:43 UTC 2025


On Mon, 25 Aug 2025 13:46:55 GMT, Emanuel Peter <epeter at openjdk.org> wrote:

>> Marc Chevalier has updated the pull request incrementally with one additional commit since the last revision:
>> 
>>   Benoît's comments
>
> src/hotspot/share/opto/graphInvariants.cpp line 32:
> 
>> 30: 
>> 31: void LocalGraphInvariant::LazyReachableCFGNodes::fill() {
>> 32:   precond(live_nodes.size() == 0);
> 
> Maybe I missed something here: where do the `precond` and `postcond` come from?

`debug.hpp` just next to `assert`. They are "standard", but not very widely used. I think they are good as they clearly state what is a precondition or a postcondition. There is no message (or rather a default one), but it's better (or not worse) than giving a not very inspired one, like "fail", which one can find often.

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

PR Review Comment: https://git.openjdk.org/jdk/pull/26362#discussion_r2321320549


More information about the hotspot-compiler-dev mailing list