RFR: 8342692: C2: long counted loop/long range checks: don't create loop-nest for short running loops [v20]
Roland Westrelin
roland at openjdk.org
Thu May 15 15:39:59 UTC 2025
On Thu, 15 May 2025 13:00:19 GMT, Christian Hagedorn <chagedorn at openjdk.org> wrote:
>> Roland Westrelin has updated the pull request incrementally with two additional commits since the last revision:
>>
>> - Emanuel's review
>> - Christian's review
>
> src/hotspot/share/opto/loopnode.cpp line 1191:
>
>> 1189: loop->compute_trip_count(this, bt);
>> 1190: // Loop must run for no more than iter_limits as it guarantees no overflow of scale * iv in long range checks.
>> 1191: bool known_short_running_loop = head->trip_count() <= iters_limit / ABS(stride_con);
>
> Can you also add a comment about the decision of the hardcoded `iters_limit / ABS(stride_con)` limit to indicate a short running long loop?
Rather than `ShortLoopIter`? Or is it something else that you'd like to be better explained?
-------------
PR Review Comment: https://git.openjdk.org/jdk/pull/21630#discussion_r2091476799
More information about the hotspot-compiler-dev
mailing list