Cranelift: ISLE: add type parameters to most clif terms in lower#12717
Open
avanhatt wants to merge 5 commits intobytecodealliance:mainfrom
Open
Cranelift: ISLE: add type parameters to most clif terms in lower#12717avanhatt wants to merge 5 commits intobytecodealliance:mainfrom
avanhatt wants to merge 5 commits intobytecodealliance:mainfrom
Conversation
Right now in ISLE, most clif instructions have a type parameter in opt for the midend, but not in lowering. From our previous discussions, this is mostly due to the order of implementation rather than a design deciscion. For our verification work, it's useful to also have the type parameters in the lowering terms, as well, if they produce values (e.g., excluding things like `store`). This is based on an earlier commit from @mmcloughlin, with changes to merge into upstream after bytecodealliance#10524.
avanhatt
commented
Mar 4, 2026
| let mut s = format!( | ||
| "({inst_data_etor} {}(InstructionData.{} (Opcode.{})", | ||
| if ty_in_decl { "ty " } else { "" }, | ||
| if ty_in_decl { "ty " } else if isle_target == IsleTarget::Lower { "_" } else { "" }, |
Member
Author
There was a problem hiding this comment.
CC @fitzgen this is not the cleanest, but I wasn't sure about adding another result to the match tuple creation you added above. The alternative is to add another inst_data_value variant to the backend with a distinct signature. Thoughts?
Member
Author
|
Oops, hadn't built the |
Co-authored-by: Nick Fitzgerald <fitzgen@gmail.com>
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Discussed in issue #12716.
Right now in ISLE, most clif instructions have a type parameter in opt for the midend, but not in lowering (e.g.,
iadd ty x y)vs(iadd x y). From our previous discussions (@cfallin @fitzgen), this is mostly due to the order of implementation rather than a design decision. For our verification work, it's useful to also have the type parameters in the lowering terms, as well, if they produce values (e.g., excluding things likestore).This changes uses scripting to automatically change the many relevant rules, by programmatically adding
_. Over time, we can update rules to remove now-simplifiablehas_tyterms.This is based on an earlier commit/script from @mmcloughlin , with changes to merge into upstream after #10524.