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

Emanuel Peter epeter at openjdk.org
Tue Sep 9 07:38:59 UTC 2025


On Tue, 9 Sep 2025 07:33:25 GMT, Marc Chevalier <mchevalier at openjdk.org> wrote:

>> src/hotspot/share/opto/graphInvariants.cpp line 215:
>> 
>>> 213:       ss.print_cr("Input at index %d is nullptr.", _which_input);
>>> 214:       return false;
>>> 215:     }
>> 
>> So we would never do `AtInput(0, ExpectNullptr())` for example?
>> Fine with me, just an idea to consider ;)
>
> No, we can't do that because every pattern must be applied on a center. `AtInput` moves the center. We cannot use a parametric pattern to check that a node around is not there: there would be no place to apply the parameter pattern. We can make `InputIsNull(int)` for that.

Sounds good, we can do that when we need it :)

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

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


More information about the hotspot-compiler-dev mailing list