A number of register types overlap with the vector registers. When reading the
assembly it is not immediately obvious what vector registers overlap with what
other registers. This patch aims to add a comment to show which VSR registers
are used or defined for each instruction.
Details
Diff Detail
- Repository
- rG LLVM Github Monorepo
Event Timeline
nit: The description has regsiter a number of times, please update it to register
This a ver useful patch. Thanks Stefan! I have a question (might be silly but...), if verbose asm is enabled by default, does it require an update to more than the two test cases that you've updated in this patch?
(I guess what I am getting at here is if verbose asm is enabled by default, I would have expected a whole bunch of other tests to also require updating, but I may be misunderstanding here.)
llvm/lib/Target/PowerPC/MCTargetDesc/PPCInstComments.cpp | ||
---|---|---|
23 | ||
125 |
For some reason I always seem to typo the word register. Not sure why... Anyway, thank you for finding them.
Not a silly question at all!
Initially I thought that I didn't need to update the tests because I wan't changing code and the CHECK/CHECK-NEXT lines don't really care that there are comments that come after the instructions. This is true in most cases but there are tests that already have a comment after the instruction line (for example # 8-byte Folded Spill) and in those cases by adding a second comment I'm adding a new line and the CHECK-NEXT lines don't work anymore. Anyway, I'm going to update those tests now.
llvm/lib/Target/PowerPC/MCTargetDesc/PPCInstComments.cpp | ||
---|---|---|
32–39 | This seems like something that can be useful in other implementations. | |
112 | Wondering why this is not implemented as part of the PPCInstPrinter class since it's only ever used for printing PPC instructions. | |
155 | This bool return value seem to have no uses. | |
llvm/test/CodeGen/PowerPC/aix-p9-insert-extract.ll | ||
152 | Seems Vec Uses: contain duplicate input for the same vector? Vec Uses: V3(VSR35)V3(VSR35) |
Not a silly question at all!
Initially I thought that I didn't need to update the tests because I wan't changing code and the CHECK/CHECK-NEXT lines don't really care that there are comments that come after the instructions. This is true in most cases but there are tests that already have a comment after the instruction line (for example # 8-byte Folded Spill) and in those cases by adding a second comment I'm adding a new line and the CHECK-NEXT lines don't work anymore. Anyway, I'm going to update those tests now.
Is it possible to append to the comment line instead of adding a new comment line below it? Not a huge deal but thought maybe it would look cleaner to have all comments on the same line. Or at least indented to indicate it's part of the previous line?
I have not had time to do this and the priority of this work is very low so I don't see myself getting back to it.
As a result, I'm going to abandon this patch.