-
Notifications
You must be signed in to change notification settings - Fork 1.5k
Add option to use regalloc3 as the register allocator #11213
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
base: main
Are you sure you want to change the base?
Conversation
Regalloc3 doesn't support def operands on return instructions and this doesn't interact with register allocation anyways, so hard-code the use of r11 directly in `emit_return_call_common_sequence`.
Subscribe to Label Action
This issue or pull request has been labeled: "cranelift", "cranelift:area:machinst", "cranelift:area:x64", "cranelift:meta", "isle", "wasmtime:api", "wasmtime:config"
Thus the following users have been cc'd because of the following labels:
To subscribe or unsubscribe from this label, edit the |
Label Messager: wasmtime:configIt looks like you are changing Wasmtime's configuration options. Make sure to
To modify this label's message, edit the To add new label messages or remove existing label messages, edit the |
Subscribe to Label Actioncc @fitzgen
This issue or pull request has been labeled: "fuzzing"
Thus the following users have been cc'd because of the following labels:
To subscribe or unsubscribe from this label, edit the |
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 modulo comment below, removing the [patch.crates-io]
bits when upstream is ready, and getting CI passing.
Regarding CI, there are currently 3 issues:
|
This is based on bytecodealliance/regalloc2#230 which adds regalloc3 as a back-end to regalloc2.
Only one change had to be made to codegen: tail calls were reserving
r11
as a scratch register by making it a def on the return instruction. This is not supported by regalloc3, which allows it extends all live ranges to the end ofret
instruction so that the live range segment can merge with the next one. Since a def on a return instruction is meaningless, I've changed it to a hard-coded register in the emit stage instead.