[llvm] [RISCV] Use lookup tables to find CVTFOpc (PR #88742)

Pengcheng Wang via llvm-commits llvm-commits at lists.llvm.org
Tue Apr 16 21:20:58 PDT 2024


================
@@ -20,27 +20,14 @@
 
 #define DEBUG_TYPE "llvm-mca-riscv-custombehaviour"
 
-// This brings in a table with primary key of
-// base instruction opcode and lmul and maps
-// to the opcode of the pseudo instruction.
-namespace RISCVVInversePseudosTable {
-using namespace llvm;
-using namespace llvm::RISCV;
-
-struct PseudoInfo {
-  uint16_t Pseudo;
-  uint16_t BaseInstr;
-  uint8_t VLMul;
-  uint8_t SEW;
-};
+namespace llvm {
 
+namespace RISCVVInversePseudosTable {
+using namespace RISCV;
 #define GET_RISCVVInversePseudosTable_IMPL
-#define GET_RISCVVInversePseudosTable_DECL
 #include "RISCVGenSearchableTables.inc"
----------------
wangpc-pp wrote:

I meant we can put `GET_RISCVVInversePseudosTable_DECL` in `RISCVMCTargetDesc.h` and put `GET_RISCVVInversePseudosTable_IMPL` in `RISCVMCTargetDesc.cpp`.

https://github.com/llvm/llvm-project/pull/88742


More information about the llvm-commits mailing list