RFR: 8315066: Add unsigned bounds and known bits to TypeInt/Long [v54]

Emanuel Peter epeter at openjdk.org
Thu May 1 15:06:05 UTC 2025


On Thu, 1 May 2025 10:41:43 GMT, Quan Anh Mai <qamai at openjdk.org> wrote:

>> src/hotspot/share/opto/rangeinference.cpp line 938:
>> 
>>> 936: 
>>> 937: template <class U>
>>> 938: const char* TypeIntHelper::bitname(char* buf, size_t buf_size, U zeros, U ones) {
>> 
>> Wow, these will look incredibly long for 64bit long values, no?
>> Well, if it ever gets too much in the way, we can still try to find more compressed representations later.
>> Maybe things like: `*..*000` for 8-aligned values.
>> Others: `0..0***`, `00*..*`, `1..1***` etc.
>> `0..0*..*` would be a little unfortunate as we would lose the position where the bits flip.
>
> It only gets printed when we print verbose the `TypeInt` instance, for normal `dump` bit information is not present.

Hmm, maybe we can find some way to only print the bits if they give "additional information" that is not given by the ranges. Otherwise, we would not print alignment information, and that's quite a shame.

-------------

PR Review Comment: https://git.openjdk.org/jdk/pull/17508#discussion_r2070379738


More information about the hotspot-compiler-dev mailing list