Stream: git-wasmtime

Topic: wasmtime / PR #8040 winch: Experiment with callee saves


view this post on Zulip Wasmtime GitHub notifications bot (Mar 02 2024 at 01:01):

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:

Our development process is documented in the Wasmtime book:
https://docs.wasmtime.dev/contributing-development-process.html

Please ensure all communication follows the code of conduct:
https://github.com/bytecodealliance/wasmtime/blob/main/CODE_OF_CONDUCT.md
-->

view this post on Zulip Wasmtime GitHub notifications bot (Mar 02 2024 at 01:03):

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:

To subscribe or unsubscribe from this label, edit the <code>.github/subscribe-to-label.json</code> configuration file.

Learn more.
</details>

view this post on Zulip Wasmtime GitHub notifications bot (Mar 02 2024 at 01:06):

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:

Our development process is documented in the Wasmtime book:
https://docs.wasmtime.dev/contributing-development-process.html

Please ensure all communication follows the code of conduct:
https://github.com/bytecodealliance/wasmtime/blob/main/CODE_OF_CONDUCT.md
-->

view this post on Zulip Wasmtime GitHub notifications bot (Mar 02 2024 at 01:14):

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:

Our development process is documented in the Wasmtime book:
https://docs.wasmtime.dev/contributing-development-process.html

Please ensure all communication follows the code of conduct:
https://github.com/bytecodealliance/wasmtime/blob/main/CODE_OF_CONDUCT.md
-->

view this post on Zulip Wasmtime GitHub notifications bot (Mar 06 2024 at 00:21):

elliottt updated PR #8040.

view this post on Zulip Wasmtime GitHub notifications bot (Mar 06 2024 at 17:16):

elliottt updated PR #8040.

view this post on Zulip Wasmtime GitHub notifications bot (Mar 06 2024 at 22:41):

elliottt closed without merge PR #8040.

view this post on Zulip Wasmtime GitHub notifications bot (Mar 06 2024 at 22:41):

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: Oct 23 2024 at 20:03 UTC