Stream: git-wasmtime

Topic: wasmtime / PR #3798 cranelift: Use GPR newtypes extensive...


view this post on Zulip Wasmtime GitHub notifications bot (Feb 14 2022 at 19:02):

fitzgen opened PR #3798 from use-gpr-newtypes to main:

We already defined the Gpr newtype and used it in a few places, and we already
defined the Xmm newtype and used it extensively. This finishes the transition
to using the newtypes extensively in lowering by making use of Gpr in more
places.

Fixes #3685

<!--

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 (Feb 14 2022 at 19:02):

fitzgen requested cfallin for a review on PR #3798.

view this post on Zulip Wasmtime GitHub notifications bot (Feb 14 2022 at 19:24):

cfallin submitted PR review.

view this post on Zulip Wasmtime GitHub notifications bot (Feb 14 2022 at 19:24):

cfallin submitted PR review.

view this post on Zulip Wasmtime GitHub notifications bot (Feb 14 2022 at 19:24):

cfallin created PR review comment:

Would it make sense to make regs::rax() and friends return a Gpr directly, and likewise regs::xmm0() and friends return an Xmm directly? This callsite gets simpler but others maybe gain a .to_reg(), so it's not necessarily any less verbose, but it is a bit more typesafe.

view this post on Zulip Wasmtime GitHub notifications bot (Feb 14 2022 at 19:30):

fitzgen submitted PR review.

view this post on Zulip Wasmtime GitHub notifications bot (Feb 14 2022 at 19:30):

fitzgen created PR review comment:

I've avoided pushing the newtypes beyond the ISLE-glue boundary thus far. I think it would make sense to have one more PR (maybe I'll get to it while waiting on reviews for my components PRs) where we push the newtypes to all the Inst::add/etc methods and I think pushing that to regs::rax/etc in that same PR would make sense.

But I kinda don't want to do all that right now.

Does that sound good?

view this post on Zulip Wasmtime GitHub notifications bot (Feb 14 2022 at 20:49):

cfallin submitted PR review.

view this post on Zulip Wasmtime GitHub notifications bot (Feb 14 2022 at 20:49):

cfallin created PR review comment:

Yep, that's reasonable, any incremental increase in typed-ness is good but no need to block on any part of it!

view this post on Zulip Wasmtime GitHub notifications bot (Feb 14 2022 at 20:54):

fitzgen merged PR #3798.


Last updated: Nov 22 2024 at 16:03 UTC