Skip to content

Commit 58aa049

Browse files
committed
[RISCV] Move RISCVVPseudosTable from RISCVBaseInfo.h to RISCVInstrInfo.h. NFC
RISCVBaseInfo.h belongs to the MC layer, but the Pseudo instructions are only used by the CodeGen layer. So it makes sense to keep this table in the CodeGen layer.
1 parent 5dfa37a commit 58aa049

File tree

4 files changed

+23
-22
lines changed

4 files changed

+23
-22
lines changed

llvm/lib/Target/RISCV/MCTargetDesc/RISCVBaseInfo.cpp

Lines changed: 0 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -94,13 +94,6 @@ void validate(const Triple &TT, const FeatureBitset &FeatureBits) {
9494

9595
} // namespace RISCVFeatures
9696

97-
namespace RISCVVPseudosTable {
98-
99-
#define GET_RISCVVPseudosTable_IMPL
100-
#include "RISCVGenSearchableTables.inc"
101-
102-
} // namespace RISCVVPseudosTable
103-
10497
void RISCVVType::printVType(unsigned VType, raw_ostream &OS) {
10598
RISCVVSEW VSEW = getVSEW(VType);
10699
RISCVVLMUL VLMUL = getVLMUL(VType);

llvm/lib/Target/RISCV/MCTargetDesc/RISCVBaseInfo.h

Lines changed: 0 additions & 15 deletions
Original file line numberDiff line numberDiff line change
@@ -329,21 +329,6 @@ void printVType(unsigned VType, raw_ostream &OS);
329329

330330
} // namespace RISCVVType
331331

332-
namespace RISCVVPseudosTable {
333-
334-
struct PseudoInfo {
335-
#include "MCTargetDesc/RISCVBaseInfo.h"
336-
uint16_t Pseudo;
337-
uint16_t BaseInstr;
338-
};
339-
340-
using namespace RISCV;
341-
342-
#define GET_RISCVVPseudosTable_DECL
343-
#include "RISCVGenSearchableTables.inc"
344-
345-
} // end namespace RISCVVPseudosTable
346-
347332
} // namespace llvm
348333

349334
#endif

llvm/lib/Target/RISCV/RISCVInstrInfo.cpp

Lines changed: 11 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -32,6 +32,17 @@ using namespace llvm;
3232
#define GET_INSTRINFO_CTOR_DTOR
3333
#include "RISCVGenInstrInfo.inc"
3434

35+
namespace llvm {
36+
namespace RISCVVPseudosTable {
37+
38+
using namespace RISCV;
39+
40+
#define GET_RISCVVPseudosTable_IMPL
41+
#include "RISCVGenSearchableTables.inc"
42+
43+
} // namespace RISCVVPseudosTable
44+
} // namespace llvm
45+
3546
RISCVInstrInfo::RISCVInstrInfo(RISCVSubtarget &STI)
3647
: RISCVGenInstrInfo(RISCV::ADJCALLSTACKDOWN, RISCV::ADJCALLSTACKUP),
3748
STI(STI) {}

llvm/lib/Target/RISCV/RISCVInstrInfo.h

Lines changed: 12 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -137,5 +137,17 @@ class RISCVInstrInfo : public RISCVGenInstrInfo {
137137
const RISCVSubtarget &STI;
138138
};
139139

140+
namespace RISCVVPseudosTable {
141+
142+
struct PseudoInfo {
143+
uint16_t Pseudo;
144+
uint16_t BaseInstr;
145+
};
146+
147+
#define GET_RISCVVPseudosTable_DECL
148+
#include "RISCVGenSearchableTables.inc"
149+
150+
} // end namespace RISCVVPseudosTable
151+
140152
} // end namespace llvm
141153
#endif

0 commit comments

Comments
 (0)