Stream: git-wasmtime

Topic: wasmtime / PR #9986 pulley: Add special instructions for ...


view this post on Zulip Wasmtime GitHub notifications bot (Jan 11 2025 at 23:04):

alexcrichton requested cfallin for a review on PR #9986.

view this post on Zulip Wasmtime GitHub notifications bot (Jan 11 2025 at 23:04):

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

view this post on Zulip Wasmtime GitHub notifications bot (Jan 11 2025 at 23:04):

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

view this post on Zulip Wasmtime GitHub notifications bot (Jan 11 2025 at 23:04):

alexcrichton opened PR #9986 from alexcrichton:pulley-xzero-xone to bytecodealliance:main:

This commit adds a special instruction for setting a register to the value 0 or the value 1. This extends to the full width of the register and accounts for the majority of all xconst instructions found in spidermonkey.cwasm. It's not a major size decrease, but helps a bit.

<!--
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 (Jan 12 2025 at 01:05):

github-actions[bot] commented on PR #9986:

Subscribe to Label Action

cc @fitzgen

<details>
This issue or pull request has been labeled: "cranelift", "pulley"

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 (Jan 12 2025 at 06:39):

cfallin submitted PR review:

Seems reasonable. Does adding -1 too help any more with code size? I imagine it could appear with and-masks and such relatively often...

view this post on Zulip Wasmtime GitHub notifications bot (Jan 13 2025 at 16:06):

alexcrichton commented on PR #9986:

Looking at spidermonkey.cwasm before and after this PR:

The most common instances of constants were:

My guess is that -1 is folded into instructions commonly and doesn't show up as a dedicated xconst. The main use for xconst right now I think is to store a constant to memory or pass it as an ABI argument. I should probably look into adding macro-instructions for the former case...

In any case though at least for spidermonkey adding -1 I don't think will help too too much.

view this post on Zulip Wasmtime GitHub notifications bot (Jan 13 2025 at 17:00):

alexcrichton updated PR #9986.

view this post on Zulip Wasmtime GitHub notifications bot (Jan 13 2025 at 17:00):

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

view this post on Zulip Wasmtime GitHub notifications bot (Jan 13 2025 at 17:00):

alexcrichton updated PR #9986.

view this post on Zulip Wasmtime GitHub notifications bot (Jan 13 2025 at 17:00):

alexcrichton requested dicej for a review on PR #9986.

view this post on Zulip Wasmtime GitHub notifications bot (Jan 13 2025 at 17:00):

alexcrichton has enabled auto merge for PR #9986.

view this post on Zulip Wasmtime GitHub notifications bot (Jan 13 2025 at 17:32):

alexcrichton merged PR #9986.


Last updated: Jan 24 2025 at 00:11 UTC