RFR: 8367341: C2: apply KnownBits and unsigned bounds to And / Or operations
    Quan Anh Mai 
    qamai at openjdk.org
       
    Wed Oct 15 08:22:19 UTC 2025
    
    
  
On Mon, 13 Oct 2025 12:30:11 GMT, Emanuel Peter <epeter at openjdk.org> wrote:
>> Hmm, we also have the third class `TypeIntPrototype`. Do you think we really need all 3 classes?
>
> Ah, I suppose `TypeIntMirror` is always canonicalized from `TypeIntPrototype`, in the constructor?
Yah `TypeIntPrototype` is a prototype and can contain arbitrary field values while `TypeInt` and `TypeIntMirror` are canonicalized. It is sad that `TypeInt` is heavily coupled with the `Type` infrastructure, so making a mirror that does not suffer from one is necessary. I tried messing around with the `Type` allocator but it seems error-prone since we have several `TypeInt` instances coming from a different allocator (`TypeInt::ZERO` for example). As a result, having a separate type prevents these errors (`TypeIntMirror::INT` won't compile).
-------------
PR Review Comment: https://git.openjdk.org/jdk/pull/27618#discussion_r2431569822
    
    
More information about the hotspot-compiler-dev
mailing list