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 theXmm
newtype and used it extensively. This finishes the transition
to using the newtypes extensively in lowering by making use ofGpr
in more
places.Fixes #3685
<!--
Please ensure that the following steps are all taken care of before submitting
the PR.
[ ] This has been discussed in issue #..., or if not, please tell us why
here.[ ] A short description of what this does, why it is needed; if the
description becomes long, the matter should probably be discussed in an issue
first.[ ] This PR contains test cases, if meaningful.
- [ ] A reviewer from the core maintainer team has been assigned for this PR.
If you don't know who could review this, please indicate so. The list of
suggested reviewers on the right can help you.Please ensure all communication adheres to the code of conduct.
-->
fitzgen requested cfallin for a review on PR #3798.
cfallin submitted PR review.
cfallin submitted PR review.
cfallin created PR review comment:
Would it make sense to make
regs::rax()
and friends return aGpr
directly, and likewiseregs::xmm0()
and friends return anXmm
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.
fitzgen submitted PR review.
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 toregs::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?
cfallin submitted PR review.
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!
fitzgen merged PR #3798.
Last updated: Dec 23 2024 at 12:05 UTC