Stream: git-wasmtime

Topic: wasmtime / PR #9863 pulley: Add branch-with-compare-again...


view this post on Zulip Wasmtime GitHub notifications bot (Dec 19 2024 at 04:52):

alexcrichton requested fitzgen for a review on PR #9863.

view this post on Zulip Wasmtime GitHub notifications bot (Dec 19 2024 at 04:52):

alexcrichton opened PR #9863 from alexcrichton:pulley-br-with-imm to bytecodealliance:main:

This commit adds a large number of new br_if_x* instructions which compare with an immediate instead of comparing two registers. This is pretty common in wasm/compiled code where, for example, loop upper bounds are often constants. This helps compress code slightly while fusing more instructions together.

The main cost of this is that the number of opcodes added here is quite large. Like with previous immediate-taking opcodes both 8 and 32-bit variants of immediates are added for all comparisons. Additionally unlike the previous set of branch-and-compare instructions it's required to add instructions for > and >= because the operands cannot be swapped to invert the condition, further increasing the number of opcodes added.

This is a mild size reduction on spidermonkey.cwasm from 29M to 28M but it's mostly expected to be a performance win for interpreted loops.

<!--
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 (Dec 19 2024 at 04:52):

alexcrichton requested wasmtime-compiler-reviewers for a review on PR #9863.

view this post on Zulip Wasmtime GitHub notifications bot (Dec 19 2024 at 04:52):

alexcrichton requested wasmtime-core-reviewers for a review on PR #9863.

view this post on Zulip Wasmtime GitHub notifications bot (Dec 19 2024 at 04:52):

alexcrichton requested wasmtime-default-reviewers for a review on PR #9863.

view this post on Zulip Wasmtime GitHub notifications bot (Dec 19 2024 at 05:59):

fitzgen submitted PR review.

view this post on Zulip Wasmtime GitHub notifications bot (Dec 19 2024 at 06:18):

fitzgen merged PR #9863.


Last updated: Dec 23 2024 at 13:07 UTC