RFR: 8280126: C2: detect and remove dead irreducible loops [v3]
Emanuel Peter
epeter at openjdk.org
Wed Jan 25 11:01:10 UTC 2023
On Mon, 23 Jan 2023 11:27:02 GMT, Christian Hagedorn <chagedorn at openjdk.org> wrote:
>> Emanuel Peter has updated the pull request incrementally with one additional commit since the last revision:
>>
>> Improvements after review (Vladimir K)
>
> src/hotspot/share/opto/cfgnode.cpp line 607:
>
>> 605: if (is_unreachable_from_root(phase)) {
>> 606: // The irreducible loop is dead - must remove it
>> 607: PhaseIterGVN* igvn = phase->is_IterGVN();
>
> Since `phase->is_iterGVN()` is used at various places during this method, it might be worth to define the variable once and then reuse it.
We could do that. But all of those cases are guarded by a `if(can_reshape)`. So we only ever ask for `phase->is_IterGVN()` if it actually is `not-null`. That has its own appeal. Maybe we can refactor the function, but I'd rather not make this changeset even more complex.
-------------
PR: https://git.openjdk.org/jdk/pull/11764
More information about the hotspot-compiler-dev
mailing list