RFR: 8280126: C2: detect and remove dead irreducible loops [v2]
Emanuel Peter
epeter at openjdk.org
Thu Jan 12 09:22:21 UTC 2023
On Wed, 11 Jan 2023 18:00:12 GMT, Vladimir Kozlov <kvn at openjdk.org> wrote:
>> Emanuel Peter has updated the pull request with a new target base due to a merge or a rebase. The incremental webrev excludes the unrelated changes brought in by the merge/rebase. The pull request contains two additional commits since the last revision:
>>
>> - Merge branch 'master' into JDK-8280126
>> - 8280126: C2: detect and remove dead irreducible loops
>
> src/hotspot/share/opto/loopnode.cpp line 5173:
>
>> 5171: assert(head->loop_status() == RegionNode::LoopStatus::MaybeIrreducibleEntry,
>> 5172: "head has wrong loop_status");
>> 5173: assert(!head->is_Loop(), "LoopNode cannot be irreducible loop head");
>
> It is the same asserts as above. May be move to one function.
Ok, I will move it to a function `RegionNode::as_IrreducibleLoopEntry()`.
> src/hotspot/share/opto/loopnode.cpp line 5256:
>
>> 5254: }
>> 5255:
>> 5256: #ifndef PRODUCT
>
> Should be `#ifdef ASSERT` because it is called in `DEBUG_ONLY()` macro.
👍
> src/hotspot/share/opto/loopnode.cpp line 5280:
>
>> 5278: region->loop_status() == RegionNode::LoopStatus::Reducible) {
>> 5279: failure = true;
>> 5280: #ifdef ASSERT
>
> No need this.
It was very useful for debugging but can easily be added again.
@vnkozlov if you want me to remove it, I would turn the if-statement into an assert, ok?
> src/hotspot/share/opto/loopnode.hpp line 1067:
>
>> 1065: IdealLoopTree *sort( IdealLoopTree *loop, IdealLoopTree *innermost );
>> 1066:
>> 1067: #ifndef PRODUCT
>
> ` #ifdef ASSERT`
👍
-------------
PR: https://git.openjdk.org/jdk/pull/11764
More information about the hotspot-compiler-dev
mailing list