RFR: 8269820: C2 PhaseIdealLoop::do_unroll get wrong opaque node

Vladimir Kozlov kvn at openjdk.org
Tue Nov 29 17:06:27 UTC 2022


On Tue, 29 Nov 2022 14:09:42 GMT, Roland Westrelin <roland at openjdk.org> wrote:

>> src/hotspot/share/opto/split_if.cpp line 242:
>> 
>>> 240:       set_ctrl(n, ctrl->in(0)->in(0));
>>> 241:       set_ctrl(cmp, ctrl->in(0)->in(0));
>>> 242:       set_ctrl(bol, ctrl->in(0)->in(0));
>> 
>> Why you assign control to `cmp` and `bol` too?
>
> The subgraph is` (Bool (CmpI (Opaque1...))`. So if only the control of `Opaque1` is updated then the `CmpI`/`Bool` could end up with a control that strictly dominates the control of the `Opaque1`. It's quite possible that that wouldn't break anything but wouldn't it be inconsistent and quite ugly?

I mean we never assign control edge to `Bool` and `Cmp` nodes - they depend only on their inputs. At least I don't know about it.

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

PR: https://git.openjdk.org/jdk/pull/11391


More information about the hotspot-compiler-dev mailing list