1/*===- TableGen'erated file -------------------------------------*- C++ -*-===*\
2|* *|
3|* Subtarget Enumeration Source Fragment *|
4|* *|
5|* Automatically generated file, do not edit! *|
6|* *|
7\*===----------------------------------------------------------------------===*/
8
9#ifdef GET_SUBTARGETINFO_ENUM
10#undef GET_SUBTARGETINFO_ENUM
11
12namespace llvm {
13
14
15} // namespace llvm
16
17#endif // GET_SUBTARGETINFO_ENUM
18
19#ifdef GET_SUBTARGETINFO_MACRO
20
21
22#undef GET_SUBTARGETINFO_MACRO
23#endif // GET_SUBTARGETINFO_MACRO
24
25#ifdef GET_SUBTARGETINFO_MC_DESC
26#undef GET_SUBTARGETINFO_MC_DESC
27
28namespace llvm {
29
30
31#ifdef DBGFIELD
32#error "<target>GenSubtargetInfo.inc requires a DBGFIELD macro"
33#endif
34#if !defined(NDEBUG) || defined(LLVM_ENABLE_DUMP)
35#define DBGFIELD(x) x,
36#define DBGVAL_OR_NULLPTR(x) x
37#else
38#define DBGFIELD(x)
39#define DBGVAL_OR_NULLPTR(x) nullptr
40#endif
41
42// ===============================================================
43// Data tables for the new per-operand machine model.
44
45static_assert(0 <= UINT8_MAX, "NumWriteProcResEntries does not fit in uint8_t");
46static_assert(0 <= UINT8_MAX, "NumWriteLatencyEntries does not fit in uint8_t");
47
48// {ProcResourceIdx, ReleaseAtCycle, AcquireAtCycle}
49extern const llvm::MCWriteProcResEntry XCoreWriteProcResTable[] = {
50 { 0, 0, 0 }, // Invalid
51}; // XCoreWriteProcResTable
52
53// {Cycles, WriteResourceID}
54extern const llvm::MCWriteLatencyEntry XCoreWriteLatencyTable[] = {
55 { 0, 0}, // Invalid
56}; // XCoreWriteLatencyTable
57
58// {UseIdx, WriteResourceID, Cycles}
59extern const llvm::MCReadAdvanceEntry XCoreReadAdvanceTable[] = {
60 {0, 0, 0}, // Invalid
61}; // XCoreReadAdvanceTable
62
63#ifdef __GNUC__
64#pragma GCC diagnostic push
65#pragma GCC diagnostic ignored "-Woverlength-strings"
66#endif
67static constexpr char XCoreSchedClassNamesStorage[] =
68 "\0"
69 "InvalidSchedClass\0"
70 ;
71#ifdef __GNUC__
72#pragma GCC diagnostic pop
73#endif
74
75static constexpr llvm::StringTable
76XCoreSchedClassNames = XCoreSchedClassNamesStorage;
77
78extern const llvm::MCSchedModel XCoreSchedModels[] = {
79{ // NoSchedModel
80 MCSchedModel::DefaultIssueWidth,
81 MCSchedModel::DefaultMicroOpBufferSize,
82 MCSchedModel::DefaultLoopMicroOpBufferSize,
83 MCSchedModel::DefaultLoadLatency,
84 MCSchedModel::DefaultHighLatency,
85 MCSchedModel::DefaultMispredictPenalty,
86 false, // PostRAScheduler
87 false, // CompleteModel
88 false, // EnableIntervals
89 0, // Processor ID
90 nullptr, nullptr, 0, 0, // No instruction-level machine model.
91 DBGVAL_OR_NULLPTR(&XCoreSchedClassNames), // SchedClassNames
92 nullptr, // No Itinerary
93 nullptr // No extra processor descriptor
94 },
95};
96
97#undef DBGFIELD
98
99#undef DBGVAL_OR_NULLPTR
100
101static constexpr size_t XCoreCPUAliasArraySize = sizeof(std::array<SubtargetSubTypeAliasKV, 0>);
102// Sorted (by key) array of values for CPU subtype.
103extern const llvm::SubtargetSubTypeKVStorage< 2, 0, 23> XCoreSubTypeKVStorage = {
104 {
105 { sizeof(SubtargetSubTypeKV) * 2 + XCoreCPUAliasArraySize + 1, { { { 0x0ULL, 0x0ULL, 0x0ULL, 0x0ULL, 0x0ULL, 0x0ULL, 0x0ULL, } } }, { { { 0x0ULL, 0x0ULL, 0x0ULL, 0x0ULL, 0x0ULL, 0x0ULL, 0x0ULL, } } }, 0 },
106 { sizeof(SubtargetSubTypeKV) * 1 + XCoreCPUAliasArraySize + 9, { { { 0x0ULL, 0x0ULL, 0x0ULL, 0x0ULL, 0x0ULL, 0x0ULL, 0x0ULL, } } }, { { { 0x0ULL, 0x0ULL, 0x0ULL, 0x0ULL, 0x0ULL, 0x0ULL, 0x0ULL, } } }, 0 },
107 },
108 { {
109 } },
110 "\000generic\000xs1b-generic\000"};
111
112namespace XCore_MC {
113
114unsigned resolveVariantSchedClassImpl(unsigned SchedClass,
115 const MCInst *MI, const MCInstrInfo *MCII, const MCSubtargetInfo &STI, unsigned CPUID) {
116 // Don't know how to resolve this scheduling class.
117 return 0;
118}
119ArrayRef<unsigned> getVariantSchedClassTargets(unsigned SchedClass,
120 unsigned CPUID) {
121 return {};
122}
123
124} // namespace XCore_MC
125struct XCoreGenMCSubtargetInfo : public MCSubtargetInfo {
126 XCoreGenMCSubtargetInfo(const Triple &TT,
127 StringRef CPU, StringRef TuneCPU, StringRef FS,
128 StringTable PN,
129 ArrayRef<SubtargetFeatureKV> PF,
130 ArrayRef<SubtargetSubTypeKV> PD,
131 ArrayRef<SubtargetSubTypeAliasKV> PA,
132 const MCSchedModel *PSM,
133 const MCWriteProcResEntry *WPR,
134 const MCWriteLatencyEntry *WL,
135 const MCReadAdvanceEntry *RA, const InstrStage *IS,
136 const unsigned *OC, const unsigned *FP) :
137 MCSubtargetInfo(TT, CPU, TuneCPU, FS, PN, PF, PD, PA, PSM,
138 WPR, WL, RA, IS, OC, FP) { }
139
140 explicit XCoreGenMCSubtargetInfo(const MCSubtargetInfo &STI)
141 : MCSubtargetInfo(STI) {}
142
143 std::unique_ptr<MCSubtargetInfo> clone() const final {
144 return std::make_unique<XCoreGenMCSubtargetInfo>(*this);
145 }
146
147 unsigned resolveVariantSchedClass(unsigned SchedClass,
148 const MCInst *MI, const MCInstrInfo *MCII,
149 unsigned CPUID) const final {
150 return XCore_MC::resolveVariantSchedClassImpl(SchedClass, MI, MCII, *this, CPUID);
151 }
152};
153namespace XCore_MC {
154
155std::unique_ptr<MCSubtargetInfo> cloneSubtargetInfo(const MCSubtargetInfo &STI) {
156 return std::make_unique<XCoreGenMCSubtargetInfo>(STI);
157}
158
159} // namespace XCore_MC
160
161static inline MCSubtargetInfo *createXCoreMCSubtargetInfoImpl(const Triple &TT, StringRef CPU, StringRef TuneCPU, StringRef FS) {
162 return new XCoreGenMCSubtargetInfo(TT, CPU, TuneCPU, FS, StringTable(XCoreSubTypeKVStorage.Strings), {}, XCoreSubTypeKVStorage.SubTypes, ArrayRef(XCoreSubTypeKVStorage.Aliases).take_front(0), XCoreSchedModels,
163 XCoreWriteProcResTable, XCoreWriteLatencyTable, XCoreReadAdvanceTable,
164 nullptr, nullptr, nullptr);
165}
166
167
168} // namespace llvm
169
170#endif // GET_SUBTARGETINFO_MC_DESC
171
172#ifdef GET_SUBTARGETINFO_TARGET_DESC
173#undef GET_SUBTARGETINFO_TARGET_DESC
174
175#include "llvm/ADT/BitmaskEnum.h"
176#include "llvm/Support/Debug.h"
177#include "llvm/Support/raw_ostream.h"
178
179// ParseSubtargetFeatures - Parses features string setting specified
180// subtarget options.
181void llvm::XCoreSubtarget::ParseSubtargetFeatures(StringRef CPU, StringRef TuneCPU, StringRef FS) {
182 LLVM_DEBUG(dbgs() << "\nFeatures:" << FS);
183 LLVM_DEBUG(dbgs() << "\nCPU:" << CPU);
184 LLVM_DEBUG(dbgs() << "\nTuneCPU:" << TuneCPU << "\n\n");
185}
186
187#endif // GET_SUBTARGETINFO_TARGET_DESC
188
189#ifdef GET_SUBTARGETINFO_HEADER
190#undef GET_SUBTARGETINFO_HEADER
191
192namespace llvm {
193
194class DFAPacketizer;
195namespace XCore_MC {
196
197unsigned resolveVariantSchedClassImpl(unsigned SchedClass, const MCInst *MI, const MCInstrInfo *MCII, const MCSubtargetInfo &STI, unsigned CPUID);
198std::unique_ptr<MCSubtargetInfo> cloneSubtargetInfo(const MCSubtargetInfo &STI);
199ArrayRef<unsigned> getVariantSchedClassTargets(unsigned SchedClass, unsigned CPUID);
200
201} // namespace XCore_MC
202struct XCoreGenSubtargetInfo : public TargetSubtargetInfo {
203 explicit XCoreGenSubtargetInfo(const Triple &TT, StringRef CPU, StringRef TuneCPU, StringRef FS);
204public:
205 std::unique_ptr<MCSubtargetInfo> clone() const final;
206 unsigned resolveSchedClass(unsigned SchedClass, const MachineInstr *DefMI, const TargetSchedModel *SchedModel) const final;
207 unsigned resolveVariantSchedClass(unsigned SchedClass, const MCInst *MI, const MCInstrInfo *MCII, unsigned CPUID) const final;
208 DFAPacketizer *createDFAPacketizer(const InstrItineraryData *IID) const;
209 const FeatureBitset &getInlineIgnoreFeatures() const override;
210 const FeatureBitset &getInlineInverseFeatures() const override;
211 const FeatureBitset &getInlineMustMatchFeatures() const override;
212};
213
214} // namespace llvm
215
216#endif // GET_SUBTARGETINFO_HEADER
217
218#ifdef GET_SUBTARGETINFO_CTOR
219#undef GET_SUBTARGETINFO_CTOR
220
221#include "llvm/CodeGen/TargetSchedule.h"
222
223namespace llvm {
224
225extern const llvm::StringRef XCoreNames[];
226extern const llvm::SubtargetSubTypeKVStorage<2, 0, 23> XCoreSubTypeKVStorage;
227extern const llvm::MCSchedModel XCoreSchedModels[];
228extern const llvm::MCWriteProcResEntry XCoreWriteProcResTable[];
229extern const llvm::MCWriteLatencyEntry XCoreWriteLatencyTable[];
230extern const llvm::MCReadAdvanceEntry XCoreReadAdvanceTable[];
231XCoreGenSubtargetInfo::XCoreGenSubtargetInfo(const Triple &TT, StringRef CPU, StringRef TuneCPU, StringRef FS)
232 : TargetSubtargetInfo(TT, CPU, TuneCPU, FS, StringTable(XCoreSubTypeKVStorage.Strings), {}, ArrayRef(XCoreSubTypeKVStorage.SubTypes), ArrayRef(XCoreSubTypeKVStorage.Aliases).take_front(0), XCoreSchedModels,
233 XCoreWriteProcResTable, XCoreWriteLatencyTable, XCoreReadAdvanceTable,
234 nullptr, nullptr, nullptr) {}
235
236unsigned XCoreGenSubtargetInfo
237::resolveSchedClass(unsigned SchedClass, const MachineInstr *MI, const TargetSchedModel *SchedModel) const {
238 report_fatal_error("Expected a variant SchedClass");
239} // XCoreGenSubtargetInfo::resolveSchedClass
240
241unsigned XCoreGenSubtargetInfo
242::resolveVariantSchedClass(unsigned SchedClass, const MCInst *MI, const MCInstrInfo *MCII, unsigned CPUID) const {
243 return XCore_MC::resolveVariantSchedClassImpl(SchedClass, MI, MCII, *this, CPUID);
244} // XCoreGenSubtargetInfo::resolveVariantSchedClass
245
246std::unique_ptr<MCSubtargetInfo> XCoreGenSubtargetInfo::clone() const {
247 return XCore_MC::cloneSubtargetInfo(*this);
248} // XCoreGenSubtargetInfo::clone
249
250const FeatureBitset &XCoreGenSubtargetInfo::getInlineIgnoreFeatures() const {
251 static constexpr FeatureBitset Features = {
252 };
253 return Features;
254}
255
256const FeatureBitset &XCoreGenSubtargetInfo::getInlineInverseFeatures() const {
257 static constexpr FeatureBitset Features = {
258 };
259 return Features;
260}
261
262const FeatureBitset &XCoreGenSubtargetInfo::getInlineMustMatchFeatures() const {
263 static constexpr FeatureBitset Features = {
264 };
265 return Features;
266}
267
268
269} // namespace llvm
270
271#endif // GET_SUBTARGETINFO_CTOR
272
273#ifdef GET_STIPREDICATE_DECLS_FOR_MC_ANALYSIS
274#undef GET_STIPREDICATE_DECLS_FOR_MC_ANALYSIS
275
276
277#endif // GET_STIPREDICATE_DECLS_FOR_MC_ANALYSIS
278
279#ifdef GET_STIPREDICATE_DEFS_FOR_MC_ANALYSIS
280#undef GET_STIPREDICATE_DEFS_FOR_MC_ANALYSIS
281
282
283#endif // GET_STIPREDICATE_DEFS_FOR_MC_ANALYSIS
284
285