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

Emanuel Peter epeter at openjdk.org
Wed Sep 18 18:36:25 UTC 2024


On Thu, 12 Sep 2024 16:48:10 GMT, Quan Anh Mai <qamai at openjdk.org> wrote:

>> src/hotspot/share/opto/rangeinference.hpp line 69:
>> 
>>> 67:     return (v & _zeros) == 0 && (v & _ones) == _ones;
>>> 68:   }
>>> 69: };
>> 
>> It will be good if we add basic operations to KnowBits like.
>> KnownBits.getMaxValue() returning ~ZEROS
>> KnownBits.getMinValue() returning  ONE
>> KnownBits.and(KnownBits arg)
>> KnownBits.or(KnownBits arg)
>> KnownBits.xor(KnownBits args)
>> KnownBits.not()
>> 
>> 
>> These can be quite handy during data flow analysis using KnownBits
>
> Yes I think they would be helpful in later patches when implementing `Value` methods of several nodes to take advantage of additional `TypeInt` information.

Sounds good. Yes, it's great that you split this up and do it step by step! Makes it more manageable to review ❤

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

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


More information about the hotspot-compiler-dev mailing list