alexcrichton opened PR #9847 from alexcrichton:shuffle-vmcontext
to bytecodealliance:main
:
This commit shuffles the fields of
VMContext
to move memories first above all other items. This is done to ensure that the offset to memory-related fields is one of the smaller offsets and ideally fits within an 8-byte offset which helps fit into some special cases on various ISAs. For example x64 has a smaller instruction encoding for 8-bit offsets than 32-bit offsets, and I'm planning on doing a similar optimization for Pulley.<!--
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-core-reviewers for a review on PR #9847.
alexcrichton requested dicej for a review on PR #9847.
sunfishcode submitted PR review.
sunfishcode created PR review comment:
Could you add a comment here saying somthing like "Put memories close to the front, so instructions referencing them can use smaller immediate fields, as load/store instructions tend to be frequent"?
alexcrichton updated PR #9847.
alexcrichton has enabled auto merge for PR #9847.
alexcrichton merged PR #9847.
Last updated: Dec 23 2024 at 12:05 UTC