RFR: 8371581: C2: PhaseCCP should reach fixpoint by revisiting deeply-Value-d nodes [v4]

Aleksey Shipilev shade at openjdk.org
Fri Nov 14 10:01:26 UTC 2025


On Thu, 13 Nov 2025 13:19:32 GMT, Aleksey Shipilev <shade at openjdk.org> wrote:

>> src/hotspot/share/opto/phaseX.cpp line 2856:
>> 
>>> 2854:   }
>>> 2855:   // CmpPNode performs deep traversals if it compares oopptr. CmpP is not notified for changes far away.
>>> 2856:   if (n->Opcode() == Op_CmpP) {
>> 
>> The verification restricts it to `n->Opcode() == Op_CmpP && type(n->in(1))->isa_oopptr() && type(n->in(2))->isa_oopptr()`. How big is the difference here? Might this have a performance impact?
>
> Honestly, no idea. I just wanted to have a conservative check, e.g. "We know `CmpP` does something fishy? We are going to revisit it." But it will make sense to keep C2 compilation fast. Let me try to add the oopptr checks and see if anything shows up in CTW.

Seems to work fine on large CTW corpus run, so I am leaving this additional check in. Thanks!

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

PR Review Comment: https://git.openjdk.org/jdk/pull/28288#discussion_r2526824520


More information about the hotspot-compiler-dev mailing list