Stream: git-wasmtime

Topic: wasmtime / PR #15197 cranelift: store Args/Rets pairs in ...


view this post on Zulip Wasmtime GitHub notifications bot (Nov 07 2026 at 21:03):

kutluhaneth46 opened PR #15197 from kutluhaneth46:fix/cranelift-boxed-slice-argpair to bytecodealliance:main:

Summary

Addresses #5879 for the Args / Rets pseudo-instructions.

These lists are built once during ABI setup and never change length afterward, so storing Box<[ArgPair]> / Box<[RetPair]> inside the MachInst saves one machine word per instruction versus Vec (24 → 16 bytes for the list header on 64-bit). Builders still use Vec while collecting pairs, then call into_boxed_slice() when emitting the pseudo-inst.

Measurement

On this machine (size_of for the list headers):

Type Bytes (64-bit)
Vec<T> 24
Box<[T]> 16

So each Inst::Args / Inst::Rets that lives in the VCode heap carries a smaller header. Full end-to-end compile benchmarks are welcome if reviewers want them; this PR keeps the change focused on the type the issue called out (ArgPair / matching RetPair).

Testing

view this post on Zulip Wasmtime GitHub notifications bot (Nov 07 2026 at 21:03):

kutluhaneth46 removed the review request for wasmtime-compiler-reviewers from PR #15197.

view this post on Zulip Wasmtime GitHub notifications bot (Nov 07 2026 at 21:03):

kutluhaneth46 requested cfallin for a review on PR #15197.

view this post on Zulip Wasmtime GitHub notifications bot (Nov 07 2026 at 21:03):

kutluhaneth46 requested wasmtime-compiler-reviewers for a review on PR #15197.

view this post on Zulip Wasmtime GitHub notifications bot (Nov 07 2026 at 21:03):

kutluhaneth46 requested wasmtime-compiler-s390x-reviewers for a review on PR #15197.

view this post on Zulip Wasmtime GitHub notifications bot (Nov 07 2026 at 21:32):

kutluhaneth46 updated PR #15197.

view this post on Zulip Wasmtime GitHub notifications bot (Nov 07 2026 at 23:44):

github-actions[bot] added the label cranelift:area:machinst on PR #15197.

view this post on Zulip Wasmtime GitHub notifications bot (Nov 07 2026 at 23:44):

github-actions[bot] added the label cranelift on PR #15197.

view this post on Zulip Wasmtime GitHub notifications bot (Nov 07 2026 at 23:44):

github-actions[bot] added the label cranelift:area:aarch64 on PR #15197.

view this post on Zulip Wasmtime GitHub notifications bot (Nov 07 2026 at 23:44):

github-actions[bot] added the label cranelift:area:x64 on PR #15197.

view this post on Zulip Wasmtime GitHub notifications bot (Nov 07 2026 at 23:44):

github-actions[bot] added the label isle on PR #15197.

view this post on Zulip Wasmtime GitHub notifications bot (Nov 08 2026 at 00:52):

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

Subscribe to Label Action

cc @avanhatt, @cfallin, @fitzgen, @mmcloughlin

<details>
This issue or pull request has been labeled: "cranelift", "cranelift:area:aarch64", "cranelift:area:machinst", "cranelift:area:x64", "isle"

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 (Nov 09 2026 at 17:58):

:thumbs_up: cfallin submitted PR review:

Change LGTM modulo the cleanup below.

Note that this won't actually shrink MInst I believe, as there are still variants that are larger, but it's a nice tightening of the types regardless.

view this post on Zulip Wasmtime GitHub notifications bot (Nov 09 2026 at 17:58):

:speech_balloon: cfallin created PR review comment:

Thanks! Let's rename this type alias (including in the ISLE code where it's used) to something like BoxedSliceArgPair; likewise below in the other backends.

view this post on Zulip Wasmtime GitHub notifications bot (Nov 09 2026 at 19:16):

:memo: kutluhaneth46 submitted PR review.

view this post on Zulip Wasmtime GitHub notifications bot (Nov 09 2026 at 19:16):

:speech_balloon: kutluhaneth46 created PR review comment:

Renamed to BoxedSliceArgPair / BoxedSliceRetPair in the ISLE aliases and across backends. Thanks for the review.

view this post on Zulip Wasmtime GitHub notifications bot (Nov 09 2026 at 19:16):

kutluhaneth46 updated PR #15197.

view this post on Zulip Wasmtime GitHub notifications bot (Nov 09 2026 at 19:16):

kutluhaneth46 commented on PR #15197:

Renamed to BoxedSliceArgPair / BoxedSliceRetPair in the ISLE aliases and across backends. Thanks for the review.

view this post on Zulip Wasmtime GitHub notifications bot (Nov 09 2026 at 20:19):

cfallin added PR #15197 cranelift: store Args/Rets pairs in Box<[T]> instead of Vec to the merge queue.

view this post on Zulip Wasmtime GitHub notifications bot (Nov 09 2026 at 20:43):

:check: cfallin merged PR #15197.

view this post on Zulip Wasmtime GitHub notifications bot (Nov 09 2026 at 20:43):

cfallin removed PR #15197 cranelift: store Args/Rets pairs in Box<[T]> instead of Vec from the merge queue.


Last updated: Nov 19 2026 at 20:05 UTC