alexcrichton opened PR #9943 from alexcrichton:pulley-bounds-check-macro-op
to bytecodealliance:main
:
This commit starts down the path of optimizing wasm loads/stores in Pulley with macro-instructions. It's expected that these instructions are so common that it's worth putting them in the 1-byte namespace of opcodes.
Locally this gets a 10% speedup on the sightglass bz2 benchmark.
<!--
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
-->
alexcrichton requested abrown for a review on PR #9943.
alexcrichton requested wasmtime-compiler-reviewers for a review on PR #9943.
alexcrichton requested fitzgen for a review on PR #9943.
alexcrichton requested wasmtime-default-reviewers for a review on PR #9943.
alexcrichton requested wasmtime-core-reviewers for a review on PR #9943.
alexcrichton updated PR #9943.
alexcrichton commented on PR #9943:
This additionally shrinks spidermonkey.cwasm from 28M to 21M
github-actions[bot] commented on PR #9943:
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:
- fitzgen: pulley
To subscribe or unsubscribe from this label, edit the <code>.github/subscribe-to-label.json</code> configuration file.
Learn more.
</details>
abrown submitted PR review.
abrown created PR review comment:
We don't want this one to use the new
xbc
macro-op?
alexcrichton submitted PR review.
alexcrichton created PR review comment:
No we probably do but I wanted to add this here for complete-ness to show that it's not currently using the new op. One-byte loads/stores are generated a bit differently with bounds checks and use a
>=
condition instead of>
+ arithmetic to test whether something is out of bounds. That made it so it doesn't fall into the patterns I added and would need a specific opcode just for the one-byte access. I figured it's probably fine to leave that off for now and add in the future if necessary
alexcrichton merged PR #9943.
Last updated: Jan 24 2025 at 00:11 UTC