[jdk19] RFR: 8284358: Unreachable loop is not removed from C2 IR, leading to a broken graph

Vladimir Kozlov kvn at openjdk.org
Thu Jun 30 06:23:35 UTC 2022


On Thu, 30 Jun 2022 05:03:57 GMT, Tobias Hartmann <thartmann at openjdk.org> wrote:

>> src/hotspot/share/opto/cfgnode.cpp line 504:
>> 
>>> 502:       }
>>> 503:       if( phase->type(n) == Type::TOP ) {
>>> 504:         set_req_X(i, NULL, phase); // Ignore TOP inputs
>> 
>> This is not guarded by `can_reshape` (call from IGVN). It is not correct to use set_req_X() during parsing.
>
> Since [JDK-8263577](https://bugs.openjdk.org/browse/JDK-8263577), there are two versions of `Node::set_req_X`. The new one takes a `PhaseGVN` and falls back to a regular `set_req`:
> https://github.com/openjdk/jdk19/blob/dbc6e110100aa6aaa8493158312030b84152b33a/src/hotspot/share/opto/phaseX.cpp#L2159-L2165

Got it.

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

PR: https://git.openjdk.org/jdk19/pull/92


More information about the hotspot-compiler-dev mailing list