RFR: 8350864: C2: verify structural invariants of the Ideal graph [v3]
Emanuel Peter
epeter at openjdk.org
Fri Sep 5 07:53:16 UTC 2025
On Thu, 4 Sep 2025 11:14:27 GMT, Marc Chevalier <mchevalier at openjdk.org> wrote:
> We would have to find a solution if there would be multiple bindings though ... I think that's not possible with your patterns, right? Is that a fundamental constraint?
Sorry, that was not very clear. Yes you can bind multiple variables already. But you cannot do a disjuction (or) with binding. That would be helpful if you wanted to match patterns like:
((x + a) + a)
or
(a + (x + a))
We do that sort of thing a lot in IGVN optimizations: we need to be prepared to iterate over all associative reorderings.
>> Also: I would invert the check to `!counted_loop_end->is_LongCountedLoopEnd()`. Because you expect it to be a long end here. Subjective.
>
> If you want. I don't think it's perfect because then the message might be less accurate: I don't know that
>> A CountedLoopEnd is the backedge of a LongCountedLoop.
>
> I rather know that
>> The backedge of a LongCountedLoop is not a LongCountedLoopEnd
As far as I know, CountedLoopEnd is always the backedge of LongCountedLoop. Same for int. If not, I'd like to see a counter example ;)
At least this should be true after IGVN.
-------------
PR Review Comment: https://git.openjdk.org/jdk/pull/26362#discussion_r2324352933
PR Review Comment: https://git.openjdk.org/jdk/pull/26362#discussion_r2324364567
More information about the hotspot-compiler-dev
mailing list