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

ISLE: built-in integer types #9610

Open
wants to merge 1 commit into
base: main
Choose a base branch
from

Conversation

Kmeakin
Copy link
Contributor

@Kmeakin Kmeakin commented Nov 15, 2024

Follow up to #9593, adding all the built-in integer types (u8 .. u128, i8 .. i128 plus usize and isize).

Integer literal expressions and patterns are still allowed to type-check against primitive types, because there are a lot of places in the lowering/optimization code that uses (type Foo (primitive Foo)) where Foo is declared as a type alias of an integer type in Rust code. Not sure what to do about this. Perhaps it would be clearer to rename "primitive" types to "opaque" or "extern" types (and also have a mechanism for declaring transparent type aliases in ISLE)?

Closes #5431 and #3573

@Kmeakin Kmeakin requested a review from a team as a code owner November 15, 2024 01:50
@Kmeakin Kmeakin requested review from abrown and removed request for a team November 15, 2024 01:50
@github-actions github-actions bot added cranelift Issues related to the Cranelift code generator isle Related to the ISLE domain-specific language labels Nov 15, 2024
Copy link

Subscribe to Label Action

cc @cfallin, @fitzgen

This issue or pull request has been labeled: "cranelift", "isle"

Thus the following users have been cc'd because of the following labels:

  • cfallin: isle
  • fitzgen: isle

To subscribe or unsubscribe from this label, edit the .github/subscribe-to-label.json configuration file.

Learn more.

Copy link
Member

@cfallin cfallin left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Thanks! Some comments below but nothing major. This is a nice refactor and makes the language semantically a little cleaner; I like it.

cranelift/isle/isle/src/sema.rs Outdated Show resolved Hide resolved
cranelift/isle/isle/src/sema.rs Outdated Show resolved Hide resolved
Copyright (c) 2024, Arm Limited.

Signed-off-by: Karl Meakin <[email protected]>
@cfallin
Copy link
Member

cfallin commented Nov 19, 2024

Something is broken in the build in CI; once it's green I'm happy to merge.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
cranelift Issues related to the Cranelift code generator isle Related to the ISLE domain-specific language
Projects
None yet
Development

Successfully merging this pull request may close these issues.

cranelift-isle: richer integer types
2 participants