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

Marc Chevalier mchevalier at openjdk.org
Thu Sep 4 11:32:52 UTC 2025


On Mon, 25 Aug 2025 14:36:41 GMT, Emanuel Peter <epeter at openjdk.org> wrote:

>> src/hotspot/share/opto/graphInvariants.cpp line 417:
>> 
>>> 415:     if (self == nullptr) {
>>> 416:       // Must be a copy Region
>>> 417:       Node_List non_null_inputs;
>> 
>> ResouceMark?
>
> Is it worth it to do the allocation, if in most cases we just expect 1 non-null?
> Why not count non-nulls, and if we find more than one, traverse again over the Region, and filter and dump them?

True.

> And I would call it `counted_loop_end`.

Right

> Ah, another check and Bind! Why not allow Bind<BaseCountedLoopEndNode*>, so we can bind it with the cast?

I'll try something, but that would be the rather disappointing drawback (since it won't check the type at the same time). Let's see what I can do.

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

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


More information about the hotspot-compiler-dev mailing list