RFR: 8342692: C2: long counted loop/long range checks: don't create loop-nest for short running loops [v16]
Christian Hagedorn
chagedorn at openjdk.org
Thu May 15 13:04:05 UTC 2025
On Fri, 9 May 2025 12:10:05 GMT, Roland Westrelin <roland at openjdk.org> wrote:
>> src/hotspot/share/runtime/deoptimization.hpp line 122:
>>
>>> 120: Reason_short_running_long_loop, // profile reports loop runs for small number of iterations
>>> 121: #if INCLUDE_JVMCI
>>> 122: Reason_aliasing = Reason_short_running_long_loop, // optimistic assumption about aliasing failed
>>
>> Why is that required?
>
> Otherwise, this assert:
>
>
> assert((1 << _reason_bits) >= Reason_LIMIT, "enough bits");
>
>
> fails. Rather than tweak the allocation of bits to `_action_bits`, `_reason_bits`, `_debug_id_bits`, to extend `_reason_bits`, I thought it was simpler to have c2 and graal share the encoding of a reason given graal doesn't use the new `Reason_short_running_long_loop` and c2 doesn't use the jvmci specific `Reason_aliasing`.
Makes sense, thanks for the explanation!
-------------
PR Review Comment: https://git.openjdk.org/jdk/pull/21630#discussion_r2090856178
More information about the hotspot-compiler-dev
mailing list