Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Improve VPClass::mustBeNotEqual() #7425

Merged
merged 1 commit into from
Jul 30, 2024

Conversation

jdmpapin
Copy link
Contributor

This will allow reference comparisons to be folded to "not equal" more often. Previously VPClass::mustBeNotEqual() would return true only when the constraints could be distinguished by:

  • known null vs. known non-null,
  • known object index (when both are known to be non-null), or
  • fixed-class class pointer (when both are known to be non-null).

Now most of the cases where it returns true require only one of the two constraints to forbid null. Additionally, the constraints can now also be distinguished by:

  • location (heap, stack, class object),
  • array element size,
  • array length,
  • class object type bound (non-fixed), and
  • instance type bound (fixed or not).

This will allow reference comparisons to be folded to "not equal" more
often. Previously VPClass::mustBeNotEqual() would return true only when
the constraints could be distinguished by:
- known null vs. known non-null,
- known object index (when both are known to be non-null), or
- fixed-class class pointer (when both are known to be non-null).

Now most of the cases where it returns true require only one of the two
constraints to forbid null. Additionally, the constraints can now also
be distinguished by:
- location (heap, stack, class object),
- array element size,
- array length,
- class object type bound (non-fixed), and
- instance type bound (fixed or not).
@jdmpapin jdmpapin requested a review from vijaysun-omr as a code owner July 26, 2024 21:32
@vijaysun-omr vijaysun-omr self-assigned this Jul 26, 2024
@vijaysun-omr
Copy link
Contributor

Jenkins build all

@vijaysun-omr
Copy link
Contributor

Jenkins build win

@vijaysun-omr
Copy link
Contributor

Windows issue is infra related. Other checks have passed, and so I am merging.

@vijaysun-omr vijaysun-omr merged commit 4a25bae into eclipse-omr:master Jul 30, 2024
16 of 17 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants