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

cranelift-isle: richer integer types #5431

Open
jameysharp opened this issue Dec 13, 2022 · 1 comment · May be fixed by #9610
Open

cranelift-isle: richer integer types #5431

jameysharp opened this issue Dec 13, 2022 · 1 comment · May be fixed by #9610
Labels
isle Related to the ISLE domain-specific language

Comments

@jameysharp
Copy link
Contributor

Lift a bit more of the integer type system into ISLE. Namely

(type u64 (primitive u64 integer 64 unsigned))
(type i64 (primitive i64 integer 64 signed))

such that in a u64 context we accept literals in 0..2^64 and in an i64 context we accept -2^63..2^63. Then we also add some syntax

(imm $I64 (u64 -1:i64))  ;; sketching some syntax, please bikeshed something better

where u64 used in term position is a cast (compiles to as u64, but also works with typechecking at ISLE level) and :i64 on a constant sets the type of the constant.

This is all a bit uncertain but I feel there's a better system for constants, and for integer types, buried in here somewhere...

Originally posted by @cfallin in #5423 (comment)

jameysharp added a commit that referenced this issue Dec 14, 2022
* Multi-extractors should only be used in multi-terms

* ISLE int literals should be in range for their type

See #5431 and #5423.

* Make StableSet usable in public interfaces

Also implement an immutable version of DisjointSets::find_mut.

* Return analyzed terms from overlap check

If the caller wants the `trie_again::RuleSet` for a term, don't make
them recompute it.

* Expose binding lookups and sources

* Don't dedup or prune impure constructor calls

* Record int types for bindings and constraints

This means that bindings for constant integers that have the same value
but not the same type no longer hash-cons into the same binding ID.

* Track binding sites from calling multi-terms

* Implement more traits
@jameysharp jameysharp added the isle Related to the ISLE domain-specific language label Mar 31, 2023
@github-actions
Copy link

Subscribe to Label Action

cc @cfallin, @fitzgen

This issue or pull request has been labeled: "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.

@Kmeakin Kmeakin linked a pull request Nov 15, 2024 that will close this issue
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
isle Related to the ISLE domain-specific language
Projects
None yet
Development

Successfully merging a pull request may close this issue.

1 participant