[PATCH] D126317: [RISCV] Add an operand kind to the instruction/imm returned from RISCVMatInt.
Craig Topper via Phabricator via llvm-commits
llvm-commits at lists.llvm.org
Tue May 24 12:17:33 PDT 2022
craig.topper created this revision.
craig.topper added reviewers: asb, reames, luismarques.
Herald added subscribers: sunshaoce, VincentWu, luke957, StephenFan, vkmr, frasercrmck, evandro, apazos, sameer.abuasal, s.egerton, Jim, benna, psnobl, jocewei, PkmX, the_o, brucehoult, MartinMosbeck, rogfer01, edward-jones, zzheng, jrtc27, shiva0217, kito-cheng, niosHD, sabuasal, simoncook, johnrusso, rbar, hiraditya, arichardson.
Herald added a project: All.
craig.topper requested review of this revision.
Herald added subscribers: pcwang-thead, eopXD, MaskRay.
Herald added a project: LLVM.
Instead of matching opcodes to know the format to emit, use an
enum value that comes along with the opcode.
Change the consumers to use fully covered switches so that we get
a compiler warning if a new kind is added. With the opcode checks
it was easier to forget to update one of the 3 consumers.
Repository:
rG LLVM Github Monorepo
https://reviews.llvm.org/D126317
Files:
llvm/lib/Target/RISCV/AsmParser/RISCVAsmParser.cpp
llvm/lib/Target/RISCV/MCTargetDesc/RISCVMatInt.cpp
llvm/lib/Target/RISCV/MCTargetDesc/RISCVMatInt.h
llvm/lib/Target/RISCV/RISCVISelDAGToDAG.cpp
llvm/lib/Target/RISCV/RISCVInstrInfo.cpp
-------------- next part --------------
A non-text attachment was scrubbed...
Name: D126317.431749.patch
Type: text/x-patch
Size: 7074 bytes
Desc: not available
URL: <http://lists.llvm.org/pipermail/llvm-commits/attachments/20220524/bb93c16a/attachment.bin>
More information about the llvm-commits
mailing list