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