This PR adds more register class support in PowerPC,
mark OperandType for imm and memory operands.
Also added more unit tests for SnippetGenerator.
Paths
| Differential D88044
[llvm-exegesis][PowerPC] Add more register classes ClosedPublic Authored by jsji on Sep 21 2020, 1:50 PM.
Details
Summary This PR adds more register class support in PowerPC, Also added more unit tests for SnippetGenerator.
Diff Detail
Event TimelineComment Actions This looks good for the llvm-exegesis part. I'm not familiar enough with the PowerPC target to review the rest.
Comment Actions I think the code being added here (and perhaps the existing code as well) requires deep expertise in both PowerPC ISA and Exegesis. But I think with more descriptive comments, we can make it consumable for those that only check one of those boxes. So most of my comments are requests to add more descriptive/explanatory comments.
Comment Actions Thanks for the patch! I think code added is quite clear since most of them already exist as framework in implementation of other platforms. We can continue to support more about exegesis on PowerPC in later patches. Besides, I found llvm-exegesis -mode=latency -opcode-name=XSTDIVDP complains 'illegal instruction' on ppc64le-pwr9, which looks strange. Is that because we did not model CR well in this tool?
Comment Actions Thanks @qiucf for looking into this.
It depends. We will generate *random* instructions to form the pattern, so you should try to dump the object to see what is causing illegal instruction. But on the other hand, yes, as I mentioned , this is an incremental patch, it is far from complete. We will work to fix them in following patches.
Comment Actions LGTM, but as mentioned, we need some follow up to support more instructions. Please hold on for several days to see if @nemanjai has more comments. This revision is now accepted and ready to land.Dec 1 2020, 6:44 PM This revision was landed with ongoing or failed builds.Dec 4 2020, 7:02 AM Closed by commit rGc8ec685ca555: [llvm-exegesis][PowerPC] Add more register classes (authored by jsji). · Explain Why This revision was automatically updated to reflect the committed changes.
Revision Contents
Diff 294163 llvm/lib/Target/PowerPC/PPCInstr64Bit.td
llvm/lib/Target/PowerPC/PPCInstrInfo.td
llvm/tools/llvm-exegesis/lib/PowerPC/Target.cpp
llvm/unittests/tools/llvm-exegesis/PowerPC/CMakeLists.txt
llvm/unittests/tools/llvm-exegesis/PowerPC/SnippetGeneratorTest.cpp
llvm/unittests/tools/llvm-exegesis/PowerPC/TestBase.h
|
So, we will mark OPERAND_REGISTER in future patches?