alexcrichton requested abrown for a review on PR #9864.
alexcrichton opened PR #9864 from alexcrichton:pulley-macro-prologue-epilogue
to bytecodealliance:main
:
This commit adds two new instructions to Pulley to combine the operations of setting up a frame, allocating stack, and saving clobbered registers. This is all combined into a single instruction which is relatively large but is much smaller than each of these individual operations exploded out.
This is a size win on
spidermonkey.cwasm
by about 1M and locally in a smallfib.wat
test this is also a good speedup by reducing the number of instructions executed.<!--
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 wasmtime-default-reviewers for a review on PR #9864.
alexcrichton requested wasmtime-compiler-reviewers for a review on PR #9864.
fitzgen submitted PR review:
Nice! Wanted to put the clobbers and the frame setup all in the same instruction but the Cranelift abi traits weren’t quite making it natural. I like the way you handled that here.
fitzgen created PR review comment:
Maybe this should be called pop_frame_restore?
fitzgen created PR review comment:
Shouldn’t we be saving the full 64 bits of each register, not the usize, for when we are on 32-bit platforms? do/lr seem fine to be usize but not GPRs.
github-actions[bot] commented on PR #9864:
Subscribe to Label Action
cc @cfallin, @fitzgen
<details>
This issue or pull request has been labeled: "cranelift", "cranelift:meta", "isle", "pulley"Thus the following users have been cc'd because of the following labels:
- cfallin: isle
- fitzgen: isle, pulley
To subscribe or unsubscribe from this label, edit the <code>.github/subscribe-to-label.json</code> configuration file.
Learn more.
</details>
alexcrichton submitted PR review.
alexcrichton created PR review comment:
Oh the
ptr_size
bits are just for fp/lr which are pointer-sized, theamt
which Cranelift decides handles the 8-bytes-per-integer-register
alexcrichton requested pchickey for a review on PR #9864.
alexcrichton updated PR #9864.
alexcrichton requested wasmtime-core-reviewers for a review on PR #9864.
alexcrichton updated PR #9864.
alexcrichton has enabled auto merge for PR #9864.
alexcrichton merged PR #9864.
Last updated: Dec 23 2024 at 13:07 UTC