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 DirectXWriteProcResTable[] = {
50 { 0, 0, 0 }, // Invalid
51}; // DirectXWriteProcResTable
52
53// {Cycles, WriteResourceID}
54extern const llvm::MCWriteLatencyEntry DirectXWriteLatencyTable[] = {
55 { 0, 0}, // Invalid
56}; // DirectXWriteLatencyTable
57
58// {UseIdx, WriteResourceID, Cycles}
59extern const llvm::MCReadAdvanceEntry DirectXReadAdvanceTable[] = {
60 {0, 0, 0}, // Invalid
61}; // DirectXReadAdvanceTable
62
63#ifdef __GNUC__
64#pragma GCC diagnostic push
65#pragma GCC diagnostic ignored "-Woverlength-strings"
66#endif
67static constexpr char DirectXSchedClassNamesStorage[] =
68 "\0"
69 "InvalidSchedClass\0"
70 ;
71#ifdef __GNUC__
72#pragma GCC diagnostic pop
73#endif
74
75static constexpr llvm::StringTable
76DirectXSchedClassNames = DirectXSchedClassNamesStorage;
77
78extern const llvm::MCSchedModel DirectXSchedModels[] = {
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(&DirectXSchedClassNames), // 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 DirectXCPUAliasArraySize = sizeof(std::array<SubtargetSubTypeAliasKV, 0>);
102// Sorted (by key) array of values for CPU subtype.
103extern const llvm::SubtargetSubTypeKVStorage< 1, 0, 10> DirectXSubTypeKVStorage = {
104 {
105 { sizeof(SubtargetSubTypeKV) * 1 + DirectXCPUAliasArraySize + 1, { { { 0x0ULL, 0x0ULL, 0x0ULL, 0x0ULL, 0x0ULL, 0x0ULL, 0x0ULL, } } }, { { { 0x0ULL, 0x0ULL, 0x0ULL, 0x0ULL, 0x0ULL, 0x0ULL, 0x0ULL, } } }, 0 },
106 },
107 { {
108 } },
109 "\000generic\000"};
110
111namespace DirectX_MC {
112
113unsigned resolveVariantSchedClassImpl(unsigned SchedClass,
114 const MCInst *MI, const MCInstrInfo *MCII, const MCSubtargetInfo &STI, unsigned CPUID) {
115 // Don't know how to resolve this scheduling class.
116 return 0;
117}
118ArrayRef<unsigned> getVariantSchedClassTargets(unsigned SchedClass,
119 unsigned CPUID) {
120 return {};
121}
122
123} // namespace DirectX_MC
124struct DirectXGenMCSubtargetInfo : public MCSubtargetInfo {
125 DirectXGenMCSubtargetInfo(const Triple &TT,
126 StringRef CPU, StringRef TuneCPU, StringRef FS,
127 StringTable PN,
128 ArrayRef<SubtargetFeatureKV> PF,
129 ArrayRef<SubtargetSubTypeKV> PD,
130 ArrayRef<SubtargetSubTypeAliasKV> PA,
131 const MCSchedModel *PSM,
132 const MCWriteProcResEntry *WPR,
133 const MCWriteLatencyEntry *WL,
134 const MCReadAdvanceEntry *RA, const InstrStage *IS,
135 const unsigned *OC, const unsigned *FP) :
136 MCSubtargetInfo(TT, CPU, TuneCPU, FS, PN, PF, PD, PA, PSM,
137 WPR, WL, RA, IS, OC, FP) { }
138
139 explicit DirectXGenMCSubtargetInfo(const MCSubtargetInfo &STI)
140 : MCSubtargetInfo(STI) {}
141
142 std::unique_ptr<MCSubtargetInfo> clone() const final {
143 return std::make_unique<DirectXGenMCSubtargetInfo>(*this);
144 }
145
146 unsigned resolveVariantSchedClass(unsigned SchedClass,
147 const MCInst *MI, const MCInstrInfo *MCII,
148 unsigned CPUID) const final {
149 return DirectX_MC::resolveVariantSchedClassImpl(SchedClass, MI, MCII, *this, CPUID);
150 }
151};
152namespace DirectX_MC {
153
154std::unique_ptr<MCSubtargetInfo> cloneSubtargetInfo(const MCSubtargetInfo &STI) {
155 return std::make_unique<DirectXGenMCSubtargetInfo>(STI);
156}
157
158} // namespace DirectX_MC
159
160static inline MCSubtargetInfo *createDirectXMCSubtargetInfoImpl(const Triple &TT, StringRef CPU, StringRef TuneCPU, StringRef FS) {
161 return new DirectXGenMCSubtargetInfo(TT, CPU, TuneCPU, FS, StringTable(DirectXSubTypeKVStorage.Strings), {}, DirectXSubTypeKVStorage.SubTypes, ArrayRef(DirectXSubTypeKVStorage.Aliases).take_front(0), DirectXSchedModels,
162 DirectXWriteProcResTable, DirectXWriteLatencyTable, DirectXReadAdvanceTable,
163 nullptr, nullptr, nullptr);
164}
165
166
167} // namespace llvm
168
169#endif // GET_SUBTARGETINFO_MC_DESC
170
171#ifdef GET_SUBTARGETINFO_TARGET_DESC
172#undef GET_SUBTARGETINFO_TARGET_DESC
173
174#include "llvm/ADT/BitmaskEnum.h"
175#include "llvm/Support/Debug.h"
176#include "llvm/Support/raw_ostream.h"
177
178// ParseSubtargetFeatures - Parses features string setting specified
179// subtarget options.
180void llvm::DirectXSubtarget::ParseSubtargetFeatures(StringRef CPU, StringRef TuneCPU, StringRef FS) {
181 LLVM_DEBUG(dbgs() << "\nFeatures:" << FS);
182 LLVM_DEBUG(dbgs() << "\nCPU:" << CPU);
183 LLVM_DEBUG(dbgs() << "\nTuneCPU:" << TuneCPU << "\n\n");
184}
185
186#endif // GET_SUBTARGETINFO_TARGET_DESC
187
188#ifdef GET_SUBTARGETINFO_HEADER
189#undef GET_SUBTARGETINFO_HEADER
190
191namespace llvm {
192
193class DFAPacketizer;
194namespace DirectX_MC {
195
196unsigned resolveVariantSchedClassImpl(unsigned SchedClass, const MCInst *MI, const MCInstrInfo *MCII, const MCSubtargetInfo &STI, unsigned CPUID);
197std::unique_ptr<MCSubtargetInfo> cloneSubtargetInfo(const MCSubtargetInfo &STI);
198ArrayRef<unsigned> getVariantSchedClassTargets(unsigned SchedClass, unsigned CPUID);
199
200} // namespace DirectX_MC
201struct DirectXGenSubtargetInfo : public TargetSubtargetInfo {
202 explicit DirectXGenSubtargetInfo(const Triple &TT, StringRef CPU, StringRef TuneCPU, StringRef FS);
203public:
204 std::unique_ptr<MCSubtargetInfo> clone() const final;
205 unsigned resolveSchedClass(unsigned SchedClass, const MachineInstr *DefMI, const TargetSchedModel *SchedModel) const final;
206 unsigned resolveVariantSchedClass(unsigned SchedClass, const MCInst *MI, const MCInstrInfo *MCII, unsigned CPUID) const final;
207 DFAPacketizer *createDFAPacketizer(const InstrItineraryData *IID) const;
208 const FeatureBitset &getInlineIgnoreFeatures() const override;
209 const FeatureBitset &getInlineInverseFeatures() const override;
210 const FeatureBitset &getInlineMustMatchFeatures() const override;
211};
212
213} // namespace llvm
214
215#endif // GET_SUBTARGETINFO_HEADER
216
217#ifdef GET_SUBTARGETINFO_CTOR
218#undef GET_SUBTARGETINFO_CTOR
219
220#include "llvm/CodeGen/TargetSchedule.h"
221
222namespace llvm {
223
224extern const llvm::StringRef DirectXNames[];
225extern const llvm::SubtargetSubTypeKVStorage<1, 0, 10> DirectXSubTypeKVStorage;
226extern const llvm::MCSchedModel DirectXSchedModels[];
227extern const llvm::MCWriteProcResEntry DirectXWriteProcResTable[];
228extern const llvm::MCWriteLatencyEntry DirectXWriteLatencyTable[];
229extern const llvm::MCReadAdvanceEntry DirectXReadAdvanceTable[];
230DirectXGenSubtargetInfo::DirectXGenSubtargetInfo(const Triple &TT, StringRef CPU, StringRef TuneCPU, StringRef FS)
231 : TargetSubtargetInfo(TT, CPU, TuneCPU, FS, StringTable(DirectXSubTypeKVStorage.Strings), {}, ArrayRef(DirectXSubTypeKVStorage.SubTypes), ArrayRef(DirectXSubTypeKVStorage.Aliases).take_front(0), DirectXSchedModels,
232 DirectXWriteProcResTable, DirectXWriteLatencyTable, DirectXReadAdvanceTable,
233 nullptr, nullptr, nullptr) {}
234
235unsigned DirectXGenSubtargetInfo
236::resolveSchedClass(unsigned SchedClass, const MachineInstr *MI, const TargetSchedModel *SchedModel) const {
237 report_fatal_error("Expected a variant SchedClass");
238} // DirectXGenSubtargetInfo::resolveSchedClass
239
240unsigned DirectXGenSubtargetInfo
241::resolveVariantSchedClass(unsigned SchedClass, const MCInst *MI, const MCInstrInfo *MCII, unsigned CPUID) const {
242 return DirectX_MC::resolveVariantSchedClassImpl(SchedClass, MI, MCII, *this, CPUID);
243} // DirectXGenSubtargetInfo::resolveVariantSchedClass
244
245std::unique_ptr<MCSubtargetInfo> DirectXGenSubtargetInfo::clone() const {
246 return DirectX_MC::cloneSubtargetInfo(*this);
247} // DirectXGenSubtargetInfo::clone
248
249const FeatureBitset &DirectXGenSubtargetInfo::getInlineIgnoreFeatures() const {
250 static constexpr FeatureBitset Features = {
251 };
252 return Features;
253}
254
255const FeatureBitset &DirectXGenSubtargetInfo::getInlineInverseFeatures() const {
256 static constexpr FeatureBitset Features = {
257 };
258 return Features;
259}
260
261const FeatureBitset &DirectXGenSubtargetInfo::getInlineMustMatchFeatures() const {
262 static constexpr FeatureBitset Features = {
263 };
264 return Features;
265}
266
267
268} // namespace llvm
269
270#endif // GET_SUBTARGETINFO_CTOR
271
272#ifdef GET_STIPREDICATE_DECLS_FOR_MC_ANALYSIS
273#undef GET_STIPREDICATE_DECLS_FOR_MC_ANALYSIS
274
275
276#endif // GET_STIPREDICATE_DECLS_FOR_MC_ANALYSIS
277
278#ifdef GET_STIPREDICATE_DEFS_FOR_MC_ANALYSIS
279#undef GET_STIPREDICATE_DEFS_FOR_MC_ANALYSIS
280
281
282#endif // GET_STIPREDICATE_DEFS_FOR_MC_ANALYSIS
283
284