-
Notifications
You must be signed in to change notification settings - Fork 1.6k
Cranelift: make all non-tail, non-indirect calls patchable, and rename patchable ABI to preserve_all.
#12160
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
Merged
cfallin
merged 2 commits into
bytecodealliance:main
from
cfallin:patchability-is-not-an-instruction-its-a-way-of-life
Dec 15, 2025
Merged
Cranelift: make all non-tail, non-indirect calls patchable, and rename patchable ABI to preserve_all.
#12160
cfallin
merged 2 commits into
bytecodealliance:main
from
cfallin:patchability-is-not-an-instruction-its-a-way-of-life
Dec 15, 2025
Conversation
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
preserve_all.preserve_all.
ead0b4b to
bc459cc
Compare
Subscribe to Label ActionDetailsThis issue or pull request has been labeled: "cranelift", "cranelift:area:aarch64", "cranelift:meta", "isle"Thus the following users have been cc'd because of the following labels:
To subscribe or unsubscribe from this label, edit the |
b3caf46 to
e520c95
Compare
…e patchable ABI to `preserve_all`. As discussed in this week's Cranelift meeting, we've discovered a need to generalize the `patchable_call` mechanism and corresponding `patchable` ABI slightly. In particular, we will need patchable `try_call` callsites as well in order to allow breakpoint handlers to throw exceptions (desirable functionality eventually) and have this work in the presence of inlining. Also, it's just a nice generalization to say that patchability is an orthogonal dimension to the call ABI and the other restrictions we initially imposed, and works as long as the basic requirement (no return values) is met. This also renames the `patchable` ABI to `preserve_all`, to make it clear that its purpose is actually orthogonal, and it can be used independently of patchable callsites. It also deletes the `cold` ABI, which never actually did anything and is misleading in the presence of an actual cold-ish (subzero temperature, actually) ABI like `preserve_all`.
e520c95 to
28ea991
Compare
fitzgen
approved these changes
Dec 15, 2025
Member
fitzgen
left a comment
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
LGTM, thanks for cleaning this up!
alexcrichton
pushed a commit
to alexcrichton/wasmtime
that referenced
this pull request
Dec 18, 2025
…e patchable ABI to `preserve_all`. (bytecodealliance#12160) * Cranelift: make all non-tail, non-indirect calls patchable, and rename patchable ABI to `preserve_all`. As discussed in this week's Cranelift meeting, we've discovered a need to generalize the `patchable_call` mechanism and corresponding `patchable` ABI slightly. In particular, we will need patchable `try_call` callsites as well in order to allow breakpoint handlers to throw exceptions (desirable functionality eventually) and have this work in the presence of inlining. Also, it's just a nice generalization to say that patchability is an orthogonal dimension to the call ABI and the other restrictions we initially imposed, and works as long as the basic requirement (no return values) is met. This also renames the `patchable` ABI to `preserve_all`, to make it clear that its purpose is actually orthogonal, and it can be used independently of patchable callsites. It also deletes the `cold` ABI, which never actually did anything and is misleading in the presence of an actual cold-ish (subzero temperature, actually) ABI like `preserve_all`. * Review feedback.
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Labels
cranelift:area:aarch64
Issues related to AArch64 backend.
cranelift:meta
Everything related to the meta-language.
cranelift
Issues related to the Cranelift code generator
isle
Related to the ISLE domain-specific language
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.
As discussed in this week's Cranelift meeting, we've discovered a need to generalize the
patchable_callmechanism and correspondingpatchableABI slightly. In particular, we will need patchabletry_callcallsites as well in order to allow breakpoint handlers to throw exceptions (desirable functionality eventually) and have this work in the presence of inlining. Also, it's just a nice generalization to say that patchability is an orthogonal dimension to the call ABI and the other restrictions we initially imposed, and works as long as the basic requirement (no return values) is met.This also renames the
patchableABI topreserve_all, to make it clear that its purpose is actually orthogonal, and it can be used independently of patchable callsites. It also deletes thecoldABI, which never actually did anything and is misleading in the presence of an actual cold-ish (subzero temperature, actually) ABI likepreserve_all.