jameysharp requested fitzgen for a review on PR #4725.
jameysharp opened PR #4725 from print-consts
to main
:
When trying to read generated CLIF, it's nice to be able to see at a glance that some of the operands are defined by
iconst
instructions, without having to go find each operand's definition manually.@afonso360 suggested this in #4721 (and @bjorn3 seconded the idea) but I think it's a good idea independent of that issue.
I'm not sure if this is the right implementation, though: I don't understand the intent of the
FuncWriter
trait well enough to know if adding this to the sharedwrite_operands
function is the best place. Perhaps only some implementations ofFuncWriter
should do this?Because of that uncertainty, I haven't fixed up any of the tests which fail due to not expecting these extra comments. So I expect that CI should currently be failing.
<!--
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.
-->
jameysharp requested cfallin for a review on PR #4725.
cfallin submitted PR review.
afonso360 submitted PR review.
afonso360 submitted PR review.
afonso360 created PR review comment:
What do you think about expanding this to
UnaryIeee{32, 64}
andUnaryBool
?
afonso360 edited PR review comment.
afonso360 edited PR review comment.
jameysharp updated PR #4725 from print-consts
to main
.
jameysharp updated PR #4725 from print-consts
to main
.
jameysharp submitted PR review.
jameysharp created PR review comment:
Okay, done! That still leaves
vconst
but that's more complicated since those constants aren't inline in the instruction. I don't feel like figuring out how that works right now since it was enough of a pain fixing the tests for these changes already. I'd be happy to review a PR on top of this one if somebody feels like taking that on though.
jameysharp has marked PR #4725 as ready for review.
afonso360 submitted PR review.
jameysharp updated PR #4725 from print-consts
to main
.
jameysharp created PR review comment:
I changed my mind: it's good enough to just print which element of the constant pool is in a vector-typed value, and that was easy to do. I think that might actually be more useful than printing giant vector literals. So now there's output for
vconst
as well.
jameysharp submitted PR review.
jameysharp merged PR #4725.
Last updated: Dec 23 2024 at 12:05 UTC