Stream: git-wasmtime

Topic: wasmtime / PR #9847 Move memories first in `VMContext`


view this post on Zulip Wasmtime GitHub notifications bot (Dec 17 2024 at 23:27):

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:

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 17 2024 at 23:27):

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

view this post on Zulip Wasmtime GitHub notifications bot (Dec 17 2024 at 23:27):

alexcrichton requested dicej for a review on PR #9847.

view this post on Zulip Wasmtime GitHub notifications bot (Dec 17 2024 at 23:46):

sunfishcode submitted PR review.

view this post on Zulip Wasmtime GitHub notifications bot (Dec 17 2024 at 23:46):

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"?

view this post on Zulip Wasmtime GitHub notifications bot (Dec 17 2024 at 23:58):

alexcrichton updated PR #9847.

view this post on Zulip Wasmtime GitHub notifications bot (Dec 17 2024 at 23:58):

alexcrichton has enabled auto merge for PR #9847.

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

alexcrichton merged PR #9847.


Last updated: Dec 23 2024 at 12:05 UTC