RFR: 8315066: Add unsigned bounds and known bits to TypeInt/Long [v7]
Vladimir Kozlov
kvn at openjdk.org
Tue Sep 3 23:05:23 UTC 2024
On Tue, 3 Sep 2024 20:31:50 GMT, Quan Anh Mai <qamai at openjdk.org> wrote:
>> src/hotspot/share/opto/rangeinference.cpp line 56:
>>
>>> 54: static_assert(std::is_unsigned<T>::value, "");
>>> 55:
>>> 56: auto adjust_lo = [](T lo, const KnownBits<T>& bits) {
>>
>> This does not even capture anything. Why not make it its own dedicated method with a nice name? I guess this could also be a member method of `KnownBits`.
>
> Since it is only used here I think it would be more sensible to make it a local lambda to lower the visibility, the resulting function is not too large, too.
This frightens me ...
40 lines of code is not small. What benefit it has vs normal private method?
-------------
PR Review Comment: https://git.openjdk.org/jdk/pull/17508#discussion_r1742793453
More information about the hotspot-compiler-dev
mailing list