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

Quan Anh Mai qamai at openjdk.org
Fri Sep 6 15:24:11 UTC 2024


On Fri, 6 Sep 2024 00:35:19 GMT, Dean Long <dlong at openjdk.org> wrote:

>> https://en.wikipedia.org/wiki/Duality_(order_theory)
>
> If _lo <= x <= _hi, then I believe the dual is _hi <= x <= _lo 
> 
> If dual is really only needed for join, then it seems like we could remove the concept of dual and just implement join.

@dean-long Thanks, that is really helpful. IIUC, the duality here refers to the set of all `TypeInt` with a set `a` considered higher than `b` if `a` is a subset of `b`. This leads to our notion of bottom type being the universe set and top type being the empty set. It still does not make sense for the concept of a dual `TypeInt`, though, since the concept of duality applies to the set of `TypeInt`, not the `TypeInt`s themselves.

> My understanding is "join" means "union", "meet" means "intersection", and "dual" means "complement".

You got it backward, "join" means intersection and "meet" means union.

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

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


More information about the hotspot-compiler-dev mailing list