Stream: git-wasmtime

Topic: wasmtime / PR #6774 Wasmtime: Add support for Wasm tail c...


view this post on Zulip Wasmtime GitHub notifications bot (Jul 25 2023 at 21:01):

fitzgen opened PR #6774 from fitzgen:wasmtime-tail-calls to bytecodealliance:main:

This adds the Config::wasm_tail_call method and --wasm-features tail-call CLI flag to enable the Wasm tail calls proposal in Wasmtime.

This PR is mostly just plumbing and enabling tests, since all the prerequisite work (Wasmtime trampoline overhauls and Cranelift tail calls) was completed in earlier pull requests.

When Wasm tail calls are enabled, Wasm code uses the tail calling convention. The tail calling convention is known to cause a 1-7% slow down for regular code that isn't using tail calls, which is why it isn't used unconditionally. This involved shepherding Tunables through to Wasm signature construction methods. The eventual plan is for the tail calling convention to be used unconditionally, but not until the performance regression is addressed. This work is tracked in
https://github.com/bytecodealliance/wasmtime/issues/6759

Additionally while our x86-64, aarch64, and riscv64 backends support tail calls, the s390x backend does not support them yet. Attempts to use tail calls on s390x will return errors. Support for s390x is tracked in https://github.com/bytecodealliance/wasmtime/issues/6530

<!--
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 (Jul 25 2023 at 21:01):

fitzgen requested alexcrichton for a review on PR #6774.

view this post on Zulip Wasmtime GitHub notifications bot (Jul 25 2023 at 21:01):

fitzgen requested cfallin for a review on PR #6774.

view this post on Zulip Wasmtime GitHub notifications bot (Jul 25 2023 at 21:01):

fitzgen requested wasmtime-compiler-reviewers for a review on PR #6774.

view this post on Zulip Wasmtime GitHub notifications bot (Jul 25 2023 at 21:01):

fitzgen requested wasmtime-core-reviewers for a review on PR #6774.

view this post on Zulip Wasmtime GitHub notifications bot (Jul 25 2023 at 21:01):

fitzgen requested wasmtime-default-reviewers for a review on PR #6774.

view this post on Zulip Wasmtime GitHub notifications bot (Jul 25 2023 at 21:02):

fitzgen requested elliottt for a review on PR #6774.

view this post on Zulip Wasmtime GitHub notifications bot (Jul 25 2023 at 21:02):

fitzgen requested wasmtime-compiler-reviewers for a review on PR #6774.

view this post on Zulip Wasmtime GitHub notifications bot (Jul 25 2023 at 21:16):

alexcrichton submitted PR review:

Nice :+1:

One thing I might recommend doing though is to push a commit with prtest:full which enables tail calls by default. That'll help weed out any lingering issues and the commit can be backed out before landing to keep it off-by-default in tree

view this post on Zulip Wasmtime GitHub notifications bot (Jul 25 2023 at 21:16):

alexcrichton submitted PR review:

Nice :+1:

One thing I might recommend doing though is to push a commit with prtest:full which enables tail calls by default. That'll help weed out any lingering issues and the commit can be backed out before landing to keep it off-by-default in tree

view this post on Zulip Wasmtime GitHub notifications bot (Jul 25 2023 at 21:16):

alexcrichton created PR review comment:

One alternative, if you're interested in a little refactoring, would be to store Tunables in the Compiler itself during its constructor since the tunables are Engine invariant

view this post on Zulip Wasmtime GitHub notifications bot (Jul 25 2023 at 21:58):

fitzgen updated PR #6774.

view this post on Zulip Wasmtime GitHub notifications bot (Jul 25 2023 at 21:58):

fitzgen submitted PR review.

view this post on Zulip Wasmtime GitHub notifications bot (Jul 25 2023 at 21:58):

fitzgen created PR review comment:

Done

view this post on Zulip Wasmtime GitHub notifications bot (Jul 25 2023 at 22:53):

fitzgen updated PR #6774.

view this post on Zulip Wasmtime GitHub notifications bot (Jul 25 2023 at 23:02):

fitzgen updated PR #6774.

view this post on Zulip Wasmtime GitHub notifications bot (Jul 27 2023 at 00:25):

fitzgen updated PR #6774.

view this post on Zulip Wasmtime GitHub notifications bot (Jul 27 2023 at 00:26):

fitzgen updated PR #6774.

view this post on Zulip Wasmtime GitHub notifications bot (Jul 27 2023 at 15:35):

fitzgen updated PR #6774.

view this post on Zulip Wasmtime GitHub notifications bot (Jul 27 2023 at 15:35):

fitzgen has enabled auto merge for PR #6774.

view this post on Zulip Wasmtime GitHub notifications bot (Jul 27 2023 at 19:04):

fitzgen updated PR #6774.

view this post on Zulip Wasmtime GitHub notifications bot (Jul 27 2023 at 19:05):

fitzgen has enabled auto merge for PR #6774.

view this post on Zulip Wasmtime GitHub notifications bot (Jul 27 2023 at 19:11):

fitzgen has disabled auto merge for PR #6774.

view this post on Zulip Wasmtime GitHub notifications bot (Jul 27 2023 at 19:16):

fitzgen updated PR #6774.

view this post on Zulip Wasmtime GitHub notifications bot (Jul 27 2023 at 19:16):

fitzgen has enabled auto merge for PR #6774.

view this post on Zulip Wasmtime GitHub notifications bot (Jul 27 2023 at 20:59):

fitzgen updated PR #6774.

view this post on Zulip Wasmtime GitHub notifications bot (Jul 27 2023 at 20:59):

fitzgen has enabled auto merge for PR #6774.

view this post on Zulip Wasmtime GitHub notifications bot (Jul 27 2023 at 22:19):

fitzgen merged PR #6774.


Last updated: Dec 23 2024 at 12:05 UTC