elliottt opened PR #8040 from elliottt:trevor/winch-cranelift-abi
to bytecodealliance:main
:
Move winch closer to cranelift's abi by modifying the winch calling convention to respect callee-save registers.
<!--
Please make sure you include the following information:
If this work has been discussed elsewhere, please include a link to that
conversation. If it was discussed in an issue, just mention "issue #...".Explain why this change is needed. If the details are in an issue already,
this can be brief.Our development process is documented in the Wasmtime book:
https://docs.wasmtime.dev/contributing-development-process.htmlPlease ensure all communication follows the code of conduct:
https://github.com/bytecodealliance/wasmtime/blob/main/CODE_OF_CONDUCT.md
-->
github-actions[bot] commented on PR #8040:
Subscribe to Label Action
cc @saulecabrera
<details>
This issue or pull request has been labeled: "winch"Thus the following users have been cc'd because of the following labels:
- saulecabrera: winch
To subscribe or unsubscribe from this label, edit the <code>.github/subscribe-to-label.json</code> configuration file.
Learn more.
</details>
elliottt edited PR #8040:
Move winch closer to cranelift's abi by modifying the winch calling convention to respect callee-save registers.
One optimization this will enable is to avoid spilling values in callee-save regsiters before a function call, but that's better left to future work given how noisy this change is.
<!--
Please make sure you include the following information:
If this work has been discussed elsewhere, please include a link to that
conversation. If it was discussed in an issue, just mention "issue #...".Explain why this change is needed. If the details are in an issue already,
this can be brief.Our development process is documented in the Wasmtime book:
https://docs.wasmtime.dev/contributing-development-process.htmlPlease ensure all communication follows the code of conduct:
https://github.com/bytecodealliance/wasmtime/blob/main/CODE_OF_CONDUCT.md
-->
elliottt edited PR #8040:
Move winch closer to cranelift's abi by modifying the winch calling convention to respect callee-save registers.
One optimization this will enable is to avoid spilling values in callee-save regsiters before a function call, but that's better left to future work given how noisy this change is. Additionally if winch follows the cranelift abi, we can remove the winch implementations of all trampolines, replacing them with the ones that the wasmtime-cranelift crate already generates. While that would introduce a dependency on cranelift from winch, the trampolines are all small and would likely not affect compilation performance.
<!--
Please make sure you include the following information:
If this work has been discussed elsewhere, please include a link to that
conversation. If it was discussed in an issue, just mention "issue #...".Explain why this change is needed. If the details are in an issue already,
this can be brief.Our development process is documented in the Wasmtime book:
https://docs.wasmtime.dev/contributing-development-process.htmlPlease ensure all communication follows the code of conduct:
https://github.com/bytecodealliance/wasmtime/blob/main/CODE_OF_CONDUCT.md
-->
elliottt updated PR #8040.
elliottt updated PR #8040.
elliottt closed without merge PR #8040.
elliottt commented on PR #8040:
After discussions with @cfallin, I'm going to take an alternate approach to reusing the cranelift trampolines with winch: restoring the old "save everything" calling convention in cranelift. This would mean that we could reuse the trampolines while avoiding changing winch's abi.
Last updated: Dec 23 2024 at 12:05 UTC