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

Emanuel Peter epeter at openjdk.org
Fri Sep 5 07:27:10 UTC 2025


On Thu, 4 Sep 2025 08:50:59 GMT, Marc Chevalier <mchevalier at openjdk.org> wrote:

>> 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.

Nice, did not know that :)

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

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


More information about the hotspot-compiler-dev mailing list