Cranelift modernize docs#13809
Open
AnnieSld wants to merge 4 commits into
Open
Conversation
alexcrichton
approved these changes
Jul 6, 2026
| ## 4. Add a lowering rule per backend | ||
|
|
||
| A CLIF instruction with no backend that can lower it will hit ISLE's "no rule | ||
| matched" panic the moment it's used. At a minimum, you should add a (rule (lower (your_instr ...)) ...) definition to each cranelift/codegen/src/isa/<arch>/lower.isle backend you intend to support. If support for an architecture is not yet implemented, consider adding an explicit "unsupported" case instead. |
Member
There was a problem hiding this comment.
This last clause, an explicit "unsupported" case, is unnecessary because that's the default if no other rule happens to match. Basically it's fine to do nothing for unsupported backends when adding a new instruction
bjorn3
reviewed
Jul 6, 2026
| allocator's move coalescing, and move mitosis will eventually go away completely | ||
| once we switch over to `regalloc2`, which takes instructions in SSA form | ||
| directly as input. | ||
| allocator's move coalescing. |
Contributor
There was a problem hiding this comment.
Should the above docs be updated to alos remove the references to "move mitosis"?
bjorn3
reviewed
Jul 6, 2026
|
|
||
| The options given on the `isa` line modify the ISA-specific settings defined in | ||
| `cranelift-codegen/meta-python/isa/*/settings.py`. | ||
| `cranelift/codegen/src/isa/<arch>/settings.rs`. |
Contributor
There was a problem hiding this comment.
Suggested change
| `cranelift/codegen/src/isa/<arch>/settings.rs`. | |
| `cranelift/codegen/meta/src/isa/<arch>.rs`. |
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.
I'm reopening this as a new, smaller PR.
This PR contains only the changes I verified against the current codebase:
Addresses #4135