RFR: 8325746: Refactor Loop Unswitching code [v2]
Emanuel Peter
epeter at openjdk.org
Wed Feb 14 11:52:16 UTC 2024
On Wed, 14 Feb 2024 10:31:07 GMT, Christian Hagedorn <chagedorn at openjdk.org> wrote:
>> BTW: why do we not hoist exit conditions also? Would that not also be profitable? Just out of curiosity...
>
>> BTW: why do we not hoist exit conditions also? Would that not also be profitable? Just out of curiosity...
>
> This can better be done with a simple loop peeling which can hoist the invariant checks. See:
> https://github.com/openjdk/jdk/blob/0c2def0e3eaa4925746158294f798d37d42c50f3/src/hotspot/share/opto/loopTransform.cpp#L499-L502
Ah yes, makes sense!
Maybe add a small comment about loop peeling then? Just because you do mention that we don't handle exits, that automatically raises that question.
-------------
PR Review Comment: https://git.openjdk.org/jdk/pull/17842#discussion_r1489347947
More information about the hotspot-compiler-dev
mailing list