Stream: git-wasmtime

Topic: wasmtime / PR #5222 Add a VRegAllocator to separate VReg ...


view this post on Zulip Wasmtime GitHub notifications bot (Nov 08 2022 at 05:38):

elliottt edited PR #5222 from trevor/vreg-allocator to main:

Remove the dependency on VCode for VReg allocation. This will simplify the changes in #5172, as that PR introduces the need to allocate temporary registers from the ABI context.

This change also allows us to remove some fields from VCode: reftyped_vregs_set and have_ref_values. Additionally, the vcode_types field appears to be only used for its length after the VCode is built, so we could probably replace that field with a u32 as well.

<!--

Please ensure that the following steps are all taken care of before submitting
the PR.

Please ensure all communication adheres to the code of conduct.
-->

view this post on Zulip Wasmtime GitHub notifications bot (Nov 08 2022 at 05:40):

elliottt requested fitzgen for a review on PR #5222.

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

fitzgen submitted PR review.

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

fitzgen submitted PR review.

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

fitzgen created PR review comment:

FWIW, this could be pushed into alloc<I>, which is the only place where this is used, AFAICT. Would just make the type annotations a little simpler for other structs containing this type and remove the need for this phantom data. Not a big deal though.

view this post on Zulip Wasmtime GitHub notifications bot (Nov 08 2022 at 17:54):

elliottt submitted PR review.

view this post on Zulip Wasmtime GitHub notifications bot (Nov 08 2022 at 17:54):

elliottt created PR review comment:

I like that much more, thanks!

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

elliottt submitted PR review.

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

elliottt created PR review comment:

I gave this a try, and unfortunately it complicates the call sites of alloc, as I can't be inferred from any of the arguments :(

view this post on Zulip Wasmtime GitHub notifications bot (Nov 08 2022 at 18:05):

elliottt merged PR #5222.

view this post on Zulip Wasmtime GitHub notifications bot (Nov 08 2022 at 18:15):

cfallin submitted PR review.

view this post on Zulip Wasmtime GitHub notifications bot (Nov 08 2022 at 18:15):

cfallin submitted PR review.

view this post on Zulip Wasmtime GitHub notifications bot (Nov 08 2022 at 18:15):

cfallin created PR review comment:

This is pre-existing code I know, but as long as I'm reading over it, I think we probably should use types::INVALID to extend the Vec rather than a default of I8.

view this post on Zulip Wasmtime GitHub notifications bot (Nov 08 2022 at 18:41):

elliottt submitted PR review.

view this post on Zulip Wasmtime GitHub notifications bot (Nov 08 2022 at 18:41):

elliottt created PR review comment:

That's a good point, I'll make a follow-up PR :)

view this post on Zulip Wasmtime GitHub notifications bot (Nov 08 2022 at 19:25):

elliottt submitted PR review.

view this post on Zulip Wasmtime GitHub notifications bot (Nov 08 2022 at 19:25):

elliottt created PR review comment:

#5227


Last updated: Dec 23 2024 at 12:05 UTC