Stream: git-wasmtime

Topic: wasmtime / PR #8164 Cranelift: clone ABIArg instead of al...


view this post on Zulip Wasmtime GitHub notifications bot (Mar 18 2024 at 08:20):

jameysharp opened PR #8164 from jameysharp:simplify-gen-arg to bytecodealliance:main:

This allows us to make a single pass over an argument's slots instead of needing to first pre-allocate temporaries, because we don't need to hold a borrow of ctx. For the same reason, we can also emit the new instructions directly instead of buffering them and copying them at the end.

This approach also moves less data around. A SmallInstVec is a usize plus four M::Insts, which are 32 or 40 bytes each, while an ABIArg is only 40 bytes. Since the SmallVecs inside ABIArg almost never spill to the heap, cloning one uses less memory than allocating temporary space for a few instructions.

I was inspired to write this after working on #8151 with @elliottt, and working on this also inspired #8163.

view this post on Zulip Wasmtime GitHub notifications bot (Mar 18 2024 at 08:20):

jameysharp requested abrown for a review on PR #8164.

view this post on Zulip Wasmtime GitHub notifications bot (Mar 18 2024 at 08:20):

jameysharp requested wasmtime-compiler-reviewers for a review on PR #8164.

view this post on Zulip Wasmtime GitHub notifications bot (Mar 18 2024 at 18:58):

elliottt submitted PR review:

:shipit:

view this post on Zulip Wasmtime GitHub notifications bot (Mar 18 2024 at 19:27):

jameysharp merged PR #8164.


Last updated: Oct 23 2024 at 20:03 UTC