This patch adds custom MIR operand comments to VTYPE immediate operands
in VSETVLI instructions and SEW operands in vector codegen pseudo
instructions. The result is intended to be more human-readable and
hopefully maintainable when working with MIR, particularly when
writing or reading test cases.
Details
Diff Detail
- Repository
- rG LLVM Github Monorepo
Event Timeline
I've had this patch kicking around locally for a long time and was never sure whether the extra verbosity would be welcome. So I thought I'd throw it out there to see what people think.
llvm/test/CodeGen/RISCV/rvv/addi-scalable-offset.mir | ||
---|---|---|
43 | I wrote this when vsetvli was still printing without spaces between tokens. Presumably this should follow suit and have a space, for consistency? |
llvm/test/CodeGen/RISCV/rvv/emergency-slot.mir | ||
---|---|---|
91 | Why the number is changed from 16 to 4? |
llvm/test/CodeGen/RISCV/rvv/emergency-slot.mir | ||
---|---|---|
91 | We used to use SEW instead of log2sew. This test wasn’t updated. 16 isn’t a valid log2sew value. |
llvm/test/CodeGen/RISCV/rvv/addi-scalable-offset.mir | ||
---|---|---|
43 | Arguably, yeah... It's also not *really* part of the SEW operand and so might cause confusion when seeing how it's printed, so I've dropped it. | |
llvm/test/CodeGen/RISCV/rvv/emergency-slot.mir | ||
143–145 | Apparently not. I couldn't find any hints about what could have happened. I've pushed rG9687ca970f77 to fix this test up separately. I'm not sure why I didn't update the vslidedowns in this patch, though. |
It's already accepted and committed, but I just want to say thanks, @frasercrmck, I always need to spend time to decode that when I read the value in MIR, that really save my life.
I wrote this when vsetvli was still printing without spaces between tokens. Presumably this should follow suit and have a space, for consistency?