[llvm] 9e257b0 - [RISCV] Move RISCVVInversePseudosTable from RISCVMCTargetDesc.cpp to RISCVBaseInfo.cpp. NFC
Craig Topper via llvm-commits
llvm-commits at lists.llvm.org
Thu Feb 27 17:25:04 PST 2025
Author: Craig Topper
Date: 2025-02-27T17:24:18-08:00
New Revision: 9e257b0abcfc53e76bf4b1986a1e71986cdbabbc
URL: https://github.com/llvm/llvm-project/commit/9e257b0abcfc53e76bf4b1986a1e71986cdbabbc
DIFF: https://github.com/llvm/llvm-project/commit/9e257b0abcfc53e76bf4b1986a1e71986cdbabbc.diff
LOG: [RISCV] Move RISCVVInversePseudosTable from RISCVMCTargetDesc.cpp to RISCVBaseInfo.cpp. NFC
RISCVMCTargetDesc contains the instruction, register, etc. descriptions
from TableGen. Other searchable tables in MCTargetDesc live in RISCVBaseInfo.cpp
Added:
Modified:
llvm/lib/Target/RISCV/MCTargetDesc/RISCVBaseInfo.cpp
llvm/lib/Target/RISCV/MCTargetDesc/RISCVBaseInfo.h
llvm/lib/Target/RISCV/MCTargetDesc/RISCVMCTargetDesc.cpp
llvm/lib/Target/RISCV/MCTargetDesc/RISCVMCTargetDesc.h
Removed:
################################################################################
diff --git a/llvm/lib/Target/RISCV/MCTargetDesc/RISCVBaseInfo.cpp b/llvm/lib/Target/RISCV/MCTargetDesc/RISCVBaseInfo.cpp
index 3b2c0cba66d12..9c1c364c18549 100644
--- a/llvm/lib/Target/RISCV/MCTargetDesc/RISCVBaseInfo.cpp
+++ b/llvm/lib/Target/RISCV/MCTargetDesc/RISCVBaseInfo.cpp
@@ -33,6 +33,12 @@ namespace RISCVInsnOpcode {
#include "RISCVGenSearchableTables.inc"
} // namespace RISCVInsnOpcode
+namespace RISCVVInversePseudosTable {
+using namespace RISCV;
+#define GET_RISCVVInversePseudosTable_IMPL
+#include "RISCVGenSearchableTables.inc"
+} // namespace RISCVVInversePseudosTable
+
namespace RISCVABI {
ABI computeTargetABI(const Triple &TT, const FeatureBitset &FeatureBits,
StringRef ABIName) {
diff --git a/llvm/lib/Target/RISCV/MCTargetDesc/RISCVBaseInfo.h b/llvm/lib/Target/RISCV/MCTargetDesc/RISCVBaseInfo.h
index 5cc20954fb95b..88435b2b52ca5 100644
--- a/llvm/lib/Target/RISCV/MCTargetDesc/RISCVBaseInfo.h
+++ b/llvm/lib/Target/RISCV/MCTargetDesc/RISCVBaseInfo.h
@@ -654,6 +654,18 @@ inline static bool getSpimm(unsigned RlistVal, unsigned &SpimmVal,
void printRlist(unsigned SlistEncode, raw_ostream &OS);
} // namespace RISCVZC
+namespace RISCVVInversePseudosTable {
+struct PseudoInfo {
+ uint16_t Pseudo;
+ uint16_t BaseInstr;
+ uint8_t VLMul;
+ uint8_t SEW;
+};
+
+#define GET_RISCVVInversePseudosTable_DECL
+#include "RISCVGenSearchableTables.inc"
+} // namespace RISCVVInversePseudosTable
+
} // namespace llvm
#endif
diff --git a/llvm/lib/Target/RISCV/MCTargetDesc/RISCVMCTargetDesc.cpp b/llvm/lib/Target/RISCV/MCTargetDesc/RISCVMCTargetDesc.cpp
index 868614cbdad6d..5f1d7b03f3218 100644
--- a/llvm/lib/Target/RISCV/MCTargetDesc/RISCVMCTargetDesc.cpp
+++ b/llvm/lib/Target/RISCV/MCTargetDesc/RISCVMCTargetDesc.cpp
@@ -41,15 +41,6 @@
#define GET_SUBTARGETINFO_MC_DESC
#include "RISCVGenSubtargetInfo.inc"
-namespace llvm::RISCVVInversePseudosTable {
-
-using namespace RISCV;
-
-#define GET_RISCVVInversePseudosTable_IMPL
-#include "RISCVGenSearchableTables.inc"
-
-} // namespace llvm::RISCVVInversePseudosTable
-
using namespace llvm;
static MCInstrInfo *createRISCVMCInstrInfo() {
diff --git a/llvm/lib/Target/RISCV/MCTargetDesc/RISCVMCTargetDesc.h b/llvm/lib/Target/RISCV/MCTargetDesc/RISCVMCTargetDesc.h
index 6cc22af601fdb..bdee7ed4f011e 100644
--- a/llvm/lib/Target/RISCV/MCTargetDesc/RISCVMCTargetDesc.h
+++ b/llvm/lib/Target/RISCV/MCTargetDesc/RISCVMCTargetDesc.h
@@ -36,20 +36,6 @@ MCAsmBackend *createRISCVAsmBackend(const Target &T, const MCSubtargetInfo &STI,
std::unique_ptr<MCObjectTargetWriter> createRISCVELFObjectWriter(uint8_t OSABI,
bool Is64Bit);
-
-namespace RISCVVInversePseudosTable {
-
-struct PseudoInfo {
- uint16_t Pseudo;
- uint16_t BaseInstr;
- uint8_t VLMul;
- uint8_t SEW;
-};
-
-#define GET_RISCVVInversePseudosTable_DECL
-#include "RISCVGenSearchableTables.inc"
-
-} // namespace RISCVVInversePseudosTable
} // namespace llvm
// Defines symbolic names for RISC-V registers.
More information about the llvm-commits
mailing list