/src/build/lib/Target/VE/VEGenSubtargetInfo.inc
Line | Count | Source (jump to first uncovered line) |
1 | | /*===- TableGen'erated file -------------------------------------*- C++ -*-===*\ |
2 | | |* *| |
3 | | |* Subtarget Enumeration Source Fragment *| |
4 | | |* *| |
5 | | |* Automatically generated file, do not edit! *| |
6 | | |* *| |
7 | | \*===----------------------------------------------------------------------===*/ |
8 | | |
9 | | |
10 | | #ifdef GET_SUBTARGETINFO_ENUM |
11 | | #undef GET_SUBTARGETINFO_ENUM |
12 | | |
13 | | namespace llvm { |
14 | | namespace VE { |
15 | | enum { |
16 | | FeatureEnableVPU = 0, |
17 | | NumSubtargetFeatures = 1 |
18 | | }; |
19 | | } // end namespace VE |
20 | | } // end namespace llvm |
21 | | |
22 | | #endif // GET_SUBTARGETINFO_ENUM |
23 | | |
24 | | |
25 | | #ifdef GET_SUBTARGETINFO_MACRO |
26 | | GET_SUBTARGETINFO_MACRO(EnableVPU, false, enableVPU) |
27 | | #undef GET_SUBTARGETINFO_MACRO |
28 | | #endif // GET_SUBTARGETINFO_MACRO |
29 | | |
30 | | |
31 | | #ifdef GET_SUBTARGETINFO_MC_DESC |
32 | | #undef GET_SUBTARGETINFO_MC_DESC |
33 | | |
34 | | namespace llvm { |
35 | | // Sorted (by key) array of values for CPU features. |
36 | | extern const llvm::SubtargetFeatureKV VEFeatureKV[] = { |
37 | | { "vpu", "Enable the VPU", VE::FeatureEnableVPU, { { { 0x0ULL, 0x0ULL, 0x0ULL, 0x0ULL, 0x0ULL, } } } }, |
38 | | }; |
39 | | |
40 | | #ifdef DBGFIELD |
41 | | #error "<target>GenSubtargetInfo.inc requires a DBGFIELD macro" |
42 | | #endif |
43 | | #if !defined(NDEBUG) || defined(LLVM_ENABLE_DUMP) |
44 | | #define DBGFIELD(x) x, |
45 | | #else |
46 | | #define DBGFIELD(x) |
47 | | #endif |
48 | | |
49 | | // =============================================================== |
50 | | // Data tables for the new per-operand machine model. |
51 | | |
52 | | // {ProcResourceIdx, ReleaseAtCycle, AcquireAtCycle} |
53 | | extern const llvm::MCWriteProcResEntry VEWriteProcResTable[] = { |
54 | | { 0, 0, 0 }, // Invalid |
55 | | }; // VEWriteProcResTable |
56 | | |
57 | | // {Cycles, WriteResourceID} |
58 | | extern const llvm::MCWriteLatencyEntry VEWriteLatencyTable[] = { |
59 | | { 0, 0}, // Invalid |
60 | | }; // VEWriteLatencyTable |
61 | | |
62 | | // {UseIdx, WriteResourceID, Cycles} |
63 | | extern const llvm::MCReadAdvanceEntry VEReadAdvanceTable[] = { |
64 | | {0, 0, 0}, // Invalid |
65 | | }; // VEReadAdvanceTable |
66 | | |
67 | | #undef DBGFIELD |
68 | | |
69 | | static const llvm::MCSchedModel NoSchedModel = { |
70 | | MCSchedModel::DefaultIssueWidth, |
71 | | MCSchedModel::DefaultMicroOpBufferSize, |
72 | | MCSchedModel::DefaultLoopMicroOpBufferSize, |
73 | | MCSchedModel::DefaultLoadLatency, |
74 | | MCSchedModel::DefaultHighLatency, |
75 | | MCSchedModel::DefaultMispredictPenalty, |
76 | | false, // PostRAScheduler |
77 | | false, // CompleteModel |
78 | | false, // EnableIntervals |
79 | | 0, // Processor ID |
80 | | nullptr, nullptr, 0, 0, // No instruction-level machine model. |
81 | | nullptr, // No Itinerary |
82 | | nullptr // No extra processor descriptor |
83 | | }; |
84 | | |
85 | | // Sorted (by key) array of values for CPU subtype. |
86 | | extern const llvm::SubtargetSubTypeKV VESubTypeKV[] = { |
87 | | { "generic", { { { 0x1ULL, 0x0ULL, 0x0ULL, 0x0ULL, 0x0ULL, } } }, { { { 0x0ULL, 0x0ULL, 0x0ULL, 0x0ULL, 0x0ULL, } } }, &NoSchedModel }, |
88 | | }; |
89 | | |
90 | | namespace VE_MC { |
91 | | unsigned resolveVariantSchedClassImpl(unsigned SchedClass, |
92 | 0 | const MCInst *MI, const MCInstrInfo *MCII, unsigned CPUID) { |
93 | | // Don't know how to resolve this scheduling class. |
94 | 0 | return 0; |
95 | 0 | } |
96 | | } // end namespace VE_MC |
97 | | |
98 | | struct VEGenMCSubtargetInfo : public MCSubtargetInfo { |
99 | | VEGenMCSubtargetInfo(const Triple &TT, |
100 | | StringRef CPU, StringRef TuneCPU, StringRef FS, |
101 | | ArrayRef<SubtargetFeatureKV> PF, |
102 | | ArrayRef<SubtargetSubTypeKV> PD, |
103 | | const MCWriteProcResEntry *WPR, |
104 | | const MCWriteLatencyEntry *WL, |
105 | | const MCReadAdvanceEntry *RA, const InstrStage *IS, |
106 | | const unsigned *OC, const unsigned *FP) : |
107 | | MCSubtargetInfo(TT, CPU, TuneCPU, FS, PF, PD, |
108 | 2 | WPR, WL, RA, IS, OC, FP) { } |
109 | | |
110 | | unsigned resolveVariantSchedClass(unsigned SchedClass, |
111 | | const MCInst *MI, const MCInstrInfo *MCII, |
112 | 0 | unsigned CPUID) const override { |
113 | 0 | return VE_MC::resolveVariantSchedClassImpl(SchedClass, MI, MCII, CPUID); |
114 | 0 | } |
115 | | }; |
116 | | |
117 | 2 | static inline MCSubtargetInfo *createVEMCSubtargetInfoImpl(const Triple &TT, StringRef CPU, StringRef TuneCPU, StringRef FS) { |
118 | 2 | return new VEGenMCSubtargetInfo(TT, CPU, TuneCPU, FS, VEFeatureKV, VESubTypeKV, |
119 | 2 | VEWriteProcResTable, VEWriteLatencyTable, VEReadAdvanceTable, |
120 | 2 | nullptr, nullptr, nullptr); |
121 | 2 | } |
122 | | |
123 | | } // end namespace llvm |
124 | | |
125 | | #endif // GET_SUBTARGETINFO_MC_DESC |
126 | | |
127 | | |
128 | | #ifdef GET_SUBTARGETINFO_TARGET_DESC |
129 | | #undef GET_SUBTARGETINFO_TARGET_DESC |
130 | | |
131 | | #include "llvm/Support/Debug.h" |
132 | | #include "llvm/Support/raw_ostream.h" |
133 | | |
134 | | // ParseSubtargetFeatures - Parses features string setting specified |
135 | | // subtarget options. |
136 | 2 | void llvm::VESubtarget::ParseSubtargetFeatures(StringRef CPU, StringRef TuneCPU, StringRef FS) { |
137 | 2 | LLVM_DEBUG(dbgs() << "\nFeatures:" << FS); |
138 | 2 | LLVM_DEBUG(dbgs() << "\nCPU:" << CPU); |
139 | 2 | LLVM_DEBUG(dbgs() << "\nTuneCPU:" << TuneCPU << "\n\n"); |
140 | 2 | InitMCProcessorInfo(CPU, TuneCPU, FS); |
141 | 2 | const FeatureBitset &Bits = getFeatureBits(); |
142 | 2 | if (Bits[VE::FeatureEnableVPU]) EnableVPU = true; |
143 | 2 | } |
144 | | #endif // GET_SUBTARGETINFO_TARGET_DESC |
145 | | |
146 | | |
147 | | #ifdef GET_SUBTARGETINFO_HEADER |
148 | | #undef GET_SUBTARGETINFO_HEADER |
149 | | |
150 | | namespace llvm { |
151 | | class DFAPacketizer; |
152 | | namespace VE_MC { |
153 | | unsigned resolveVariantSchedClassImpl(unsigned SchedClass, const MCInst *MI, const MCInstrInfo *MCII, unsigned CPUID); |
154 | | } // end namespace VE_MC |
155 | | |
156 | | struct VEGenSubtargetInfo : public TargetSubtargetInfo { |
157 | | explicit VEGenSubtargetInfo(const Triple &TT, StringRef CPU, StringRef TuneCPU, StringRef FS); |
158 | | public: |
159 | | unsigned resolveSchedClass(unsigned SchedClass, const MachineInstr *DefMI, const TargetSchedModel *SchedModel) const override; |
160 | | unsigned resolveVariantSchedClass(unsigned SchedClass, const MCInst *MI, const MCInstrInfo *MCII, unsigned CPUID) const override; |
161 | | DFAPacketizer *createDFAPacketizer(const InstrItineraryData *IID) const; |
162 | | }; |
163 | | } // end namespace llvm |
164 | | |
165 | | #endif // GET_SUBTARGETINFO_HEADER |
166 | | |
167 | | |
168 | | #ifdef GET_SUBTARGETINFO_CTOR |
169 | | #undef GET_SUBTARGETINFO_CTOR |
170 | | |
171 | | #include "llvm/CodeGen/TargetSchedule.h" |
172 | | |
173 | | namespace llvm { |
174 | | extern const llvm::SubtargetFeatureKV VEFeatureKV[]; |
175 | | extern const llvm::SubtargetSubTypeKV VESubTypeKV[]; |
176 | | extern const llvm::MCWriteProcResEntry VEWriteProcResTable[]; |
177 | | extern const llvm::MCWriteLatencyEntry VEWriteLatencyTable[]; |
178 | | extern const llvm::MCReadAdvanceEntry VEReadAdvanceTable[]; |
179 | | VEGenSubtargetInfo::VEGenSubtargetInfo(const Triple &TT, StringRef CPU, StringRef TuneCPU, StringRef FS) |
180 | | : TargetSubtargetInfo(TT, CPU, TuneCPU, FS, ArrayRef(VEFeatureKV, 1), ArrayRef(VESubTypeKV, 1), |
181 | | VEWriteProcResTable, VEWriteLatencyTable, VEReadAdvanceTable, |
182 | 2 | nullptr, nullptr, nullptr) {} |
183 | | |
184 | | unsigned VEGenSubtargetInfo |
185 | 0 | ::resolveSchedClass(unsigned SchedClass, const MachineInstr *MI, const TargetSchedModel *SchedModel) const { |
186 | 0 | report_fatal_error("Expected a variant SchedClass"); |
187 | 0 | } // VEGenSubtargetInfo::resolveSchedClass |
188 | | |
189 | | unsigned VEGenSubtargetInfo |
190 | 0 | ::resolveVariantSchedClass(unsigned SchedClass, const MCInst *MI, const MCInstrInfo *MCII, unsigned CPUID) const { |
191 | 0 | return VE_MC::resolveVariantSchedClassImpl(SchedClass, MI, MCII, CPUID); |
192 | 0 | } // VEGenSubtargetInfo::resolveVariantSchedClass |
193 | | |
194 | | } // end namespace llvm |
195 | | |
196 | | #endif // GET_SUBTARGETINFO_CTOR |
197 | | |
198 | | |
199 | | #ifdef GET_STIPREDICATE_DECLS_FOR_MC_ANALYSIS |
200 | | #undef GET_STIPREDICATE_DECLS_FOR_MC_ANALYSIS |
201 | | |
202 | | #endif // GET_STIPREDICATE_DECLS_FOR_MC_ANALYSIS |
203 | | |
204 | | |
205 | | #ifdef GET_STIPREDICATE_DEFS_FOR_MC_ANALYSIS |
206 | | #undef GET_STIPREDICATE_DEFS_FOR_MC_ANALYSIS |
207 | | |
208 | | #endif // GET_STIPREDICATE_DEFS_FOR_MC_ANALYSIS |
209 | | |