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

Emanuel Peter epeter at openjdk.org
Thu Jan 30 13:54:06 UTC 2025


On Thu, 30 Jan 2025 13:32:07 GMT, Emanuel Peter <epeter at openjdk.org> wrote:

>> Quan Anh Mai has updated the pull request incrementally with one additional commit since the last revision:
>> 
>>   include
>
> src/hotspot/share/opto/type.hpp line 617:
> 
>> 615:  * E.g a TypeInt t with t._lo < 0 will definitely contain negative values. It
>> 616:  * also makes it trivial to determine if a TypeInt instance is a subset of
>> 617:  * another.
> 
> First you talk about "optimal", later about "canonicalized".
> This is a bit of a "nit", but there is no cost function we are optimizing for here ;)
> Maybe you could say that it is narrowest, and that this is what we would like to canonicalize to.
> 
> Then you can define what the canonical form is:
> 
>  * t3._lo > t2._lo || t3._hi < t2._hi || t3._ulo > t2._ulo || t3._uhi < t2._uhi ||
>  *     (t3._bits._zeros & t2._bis._zeros) != t3._bits._zeros || (t3._bits._ones & t2._bits._ones) != t3._bits._ones

Ah, below you talk about tightening. So maybe say "tightest constraints"?

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

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


More information about the hotspot-compiler-dev mailing list