Coverage Report

Created: 2019-03-24 22:13

/Users/buildslave/jenkins/workspace/clang-stage2-coverage-R/clang-build/lib/Target/Lanai/LanaiGenSubtargetInfo.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
} // end namespace llvm
15
16
#endif // GET_SUBTARGETINFO_ENUM
17
18
19
#ifdef GET_SUBTARGETINFO_MC_DESC
20
#undef GET_SUBTARGETINFO_MC_DESC
21
22
namespace llvm {
23
24
#ifdef DBGFIELD
25
#error "<target>GenSubtargetInfo.inc requires a DBGFIELD macro"
26
#endif
27
#if !defined(NDEBUG) || defined(LLVM_ENABLE_DUMP)
28
#define DBGFIELD(x) x,
29
#else
30
#define DBGFIELD(x)
31
#endif
32
33
// Functional units for "LanaiItinerary"
34
namespace LanaiItineraryFU {
35
  const unsigned ALU_FU = 1 << 0;
36
  const unsigned LDST_FU = 1 << 1;
37
} // end namespace LanaiItineraryFU
38
39
extern const llvm::InstrStage LanaiStages[] = {
40
  { 0, 0, 0, llvm::InstrStage::Required }, // No itinerary
41
  { 1, LanaiItineraryFU::ALU_FU, -1, (llvm::InstrStage::ReservationKinds)0 }, // 1
42
  { 1, LanaiItineraryFU::LDST_FU, -1, (llvm::InstrStage::ReservationKinds)0 }, // 2
43
  { 2, LanaiItineraryFU::LDST_FU, -1, (llvm::InstrStage::ReservationKinds)0 }, // 3
44
  { 0, 0, 0, llvm::InstrStage::Required } // End stages
45
};
46
extern const unsigned LanaiOperandCycles[] = {
47
  0, // No itinerary
48
  0 // End operand cycles
49
};
50
extern const unsigned LanaiForwardingPaths[] = {
51
 0, // No itinerary
52
 0 // End bypass tables
53
};
54
55
static const llvm::InstrItinerary LanaiItinerary[] = {
56
  { 0, 0, 0, 0, 0 }, // 0 NoInstrModel
57
  { 1, 1, 2, 0, 0 }, // 1 IIC_ALU_WriteALU
58
  { 1, 1, 2, 0, 0 }, // 2 IIC_ALU
59
  { 1, 2, 3, 0, 0 }, // 3 IIC_LD_WriteLD
60
  { 1, 3, 4, 0, 0 }, // 4 IIC_LDSW_WriteLDSW
61
  { 0, 0, 0, 0, 0 }, // 5 WriteLD
62
  { 1, 2, 3, 0, 0 }, // 6 IIC_ST_WriteST
63
  { 1, 3, 4, 0, 0 }, // 7 IIC_STSW_WriteSTSW
64
  { 0, uint16_t(~0U), uint16_t(~0U), uint16_t(~0U), uint16_t(~0U) }// end marker
65
};
66
67
// ===============================================================
68
// Data tables for the new per-operand machine model.
69
70
// {ProcResourceIdx, Cycles}
71
extern const llvm::MCWriteProcResEntry LanaiWriteProcResTable[] = {
72
  { 0,  0}, // Invalid
73
  { 1,  1}, // #1
74
  { 2,  1} // #2
75
}; // LanaiWriteProcResTable
76
77
// {Cycles, WriteResourceID}
78
extern const llvm::MCWriteLatencyEntry LanaiWriteLatencyTable[] = {
79
  { 0,  0}, // Invalid
80
  { 1,  0}, // #1 WriteALU
81
  { 2,  0}, // #2 WriteLD_WriteLDSW_WriteST
82
  { 4,  0} // #3 WriteSTSW
83
}; // LanaiWriteLatencyTable
84
85
// {UseIdx, WriteResourceID, Cycles}
86
extern const llvm::MCReadAdvanceEntry LanaiReadAdvanceTable[] = {
87
  {0,  0,  0}, // Invalid
88
}; // LanaiReadAdvanceTable
89
90
// {Name, NumMicroOps, BeginGroup, EndGroup, WriteProcResIdx,#, WriteLatencyIdx,#, ReadAdvanceIdx,#}
91
static const llvm::MCSchedClassDesc LanaiSchedModelSchedClasses[] = {
92
  {DBGFIELD("InvalidSchedClass")  16383, false, false,  0, 0,  0, 0,  0, 0},
93
  {DBGFIELD("IIC_ALU_WriteALU")   1, false, false,  1, 1,  1, 1,  0, 0}, // #1
94
  {DBGFIELD("IIC_ALU")            0, false, false,  0, 0,  0, 0,  0, 0}, // #2
95
  {DBGFIELD("IIC_LD_WriteLD")     1, false, false,  2, 1,  2, 1,  0, 0}, // #3
96
  {DBGFIELD("IIC_LDSW_WriteLDSW") 1, false, false,  2, 1,  2, 1,  0, 0}, // #4
97
  {DBGFIELD("WriteLD")            1, false, false,  2, 1,  2, 1,  0, 0}, // #5
98
  {DBGFIELD("IIC_ST_WriteST")     1, false, false,  2, 1,  2, 1,  0, 0}, // #6
99
  {DBGFIELD("IIC_STSW_WriteSTSW") 1, false, false,  2, 1,  3, 1,  0, 0}, // #7
100
}; // LanaiSchedModelSchedClasses
101
102
#undef DBGFIELD
103
104
static const llvm::MCSchedModel NoSchedModel = {
105
  MCSchedModel::DefaultIssueWidth,
106
  MCSchedModel::DefaultMicroOpBufferSize,
107
  MCSchedModel::DefaultLoopMicroOpBufferSize,
108
  MCSchedModel::DefaultLoadLatency,
109
  MCSchedModel::DefaultHighLatency,
110
  MCSchedModel::DefaultMispredictPenalty,
111
  false, // PostRAScheduler
112
  false, // CompleteModel
113
  0, // Processor ID
114
  nullptr, nullptr, 0, 0, // No instruction-level machine model.
115
  nullptr, // No Itinerary
116
  nullptr // No extra processor descriptor
117
};
118
119
static const unsigned LanaiSchedModelProcResourceSubUnits[] = {
120
  0,  // Invalid
121
};
122
123
// {Name, NumUnits, SuperIdx, BufferSize, SubUnitsIdxBegin}
124
static const llvm::MCProcResourceDesc LanaiSchedModelProcResources[] = {
125
  {"InvalidUnit", 0, 0, 0, 0},
126
  {"ALU",             1, 0, 0, nullptr}, // #1
127
  {"LdSt",            1, 0, 0, nullptr}, // #2
128
};
129
130
static const llvm::MCSchedModel LanaiSchedModel = {
131
  1, // IssueWidth
132
  0, // MicroOpBufferSize
133
  0, // LoopMicroOpBufferSize
134
  2, // LoadLatency
135
  MCSchedModel::DefaultHighLatency,
136
  10, // MispredictPenalty
137
  false, // PostRAScheduler
138
  false, // CompleteModel
139
  1, // Processor ID
140
  LanaiSchedModelProcResources,
141
  LanaiSchedModelSchedClasses,
142
  3,
143
  8,
144
  LanaiItinerary,
145
  nullptr // No extra processor descriptor
146
};
147
148
// Sorted (by key) array of values for CPU subtype.
149
extern const llvm::SubtargetSubTypeKV LanaiSubTypeKV[] = {
150
 { "generic", { { { 0x0ULL, 0x0ULL, 0x0ULL, } } }, &LanaiSchedModel },
151
 { "v11", { { { 0x0ULL, 0x0ULL, 0x0ULL, } } }, &LanaiSchedModel },
152
};
153
154
namespace Lanai_MC {
155
unsigned resolveVariantSchedClassImpl(unsigned SchedClass,
156
0
    const MCInst *MI, unsigned CPUID) {
157
0
  // Don't know how to resolve this scheduling class.
158
0
  return 0;
159
0
}
160
} // end of namespace Lanai_MC
161
162
struct LanaiGenMCSubtargetInfo : public MCSubtargetInfo {
163
  LanaiGenMCSubtargetInfo(const Triple &TT, 
164
    StringRef CPU, StringRef FS, ArrayRef<SubtargetFeatureKV> PF,
165
    ArrayRef<SubtargetSubTypeKV> PD,
166
    const MCWriteProcResEntry *WPR,
167
    const MCWriteLatencyEntry *WL,
168
    const MCReadAdvanceEntry *RA, const InstrStage *IS,
169
    const unsigned *OC, const unsigned *FP) :
170
      MCSubtargetInfo(TT, CPU, FS, PF, PD,
171
31
                      WPR, WL, RA, IS, OC, FP) { }
172
173
  unsigned resolveVariantSchedClass(unsigned SchedClass,
174
0
      const MCInst *MI, unsigned CPUID) const override {
175
0
    return Lanai_MC::resolveVariantSchedClassImpl(SchedClass, MI, CPUID); 
176
0
  }
177
};
178
179
31
static inline MCSubtargetInfo *createLanaiMCSubtargetInfoImpl(const Triple &TT, StringRef CPU, StringRef FS) {
180
31
  return new LanaiGenMCSubtargetInfo(TT, CPU, FS, None, LanaiSubTypeKV, 
181
31
                      LanaiWriteProcResTable, LanaiWriteLatencyTable, LanaiReadAdvanceTable, 
182
31
                      LanaiStages, LanaiOperandCycles, LanaiForwardingPaths);
183
31
}
184
185
} // end namespace llvm
186
187
#endif // GET_SUBTARGETINFO_MC_DESC
188
189
190
#ifdef GET_SUBTARGETINFO_TARGET_DESC
191
#undef GET_SUBTARGETINFO_TARGET_DESC
192
193
#include "llvm/Support/Debug.h"
194
#include "llvm/Support/raw_ostream.h"
195
196
// ParseSubtargetFeatures - Parses features string setting specified
197
// subtarget options.
198
26
void llvm::LanaiSubtarget::ParseSubtargetFeatures(StringRef CPU, StringRef FS) {
199
26
  LLVM_DEBUG(dbgs() << "\nFeatures:" << FS);
200
26
  LLVM_DEBUG(dbgs() << "\nCPU:" << CPU << "\n\n");
201
26
}
202
#endif // GET_SUBTARGETINFO_TARGET_DESC
203
204
205
#ifdef GET_SUBTARGETINFO_HEADER
206
#undef GET_SUBTARGETINFO_HEADER
207
208
namespace llvm {
209
class DFAPacketizer;
210
namespace Lanai_MC {
211
unsigned resolveVariantSchedClassImpl(unsigned SchedClass, const MCInst *MI, unsigned CPUID);
212
}
213
214
struct LanaiGenSubtargetInfo : public TargetSubtargetInfo {
215
  explicit LanaiGenSubtargetInfo(const Triple &TT, StringRef CPU, StringRef FS);
216
public:
217
  unsigned resolveSchedClass(unsigned SchedClass,  const MachineInstr *DefMI, const TargetSchedModel *SchedModel) const override;
218
  unsigned resolveVariantSchedClass(unsigned SchedClass, const MCInst *MI, unsigned CPUID) const override;
219
  DFAPacketizer *createDFAPacketizer(const InstrItineraryData *IID) const;
220
};
221
} // end namespace llvm
222
223
#endif // GET_SUBTARGETINFO_HEADER
224
225
226
#ifdef GET_SUBTARGETINFO_CTOR
227
#undef GET_SUBTARGETINFO_CTOR
228
229
#include "llvm/CodeGen/TargetSchedule.h"
230
231
namespace llvm {
232
extern const llvm::SubtargetFeatureKV LanaiFeatureKV[];
233
extern const llvm::SubtargetSubTypeKV LanaiSubTypeKV[];
234
extern const llvm::MCWriteProcResEntry LanaiWriteProcResTable[];
235
extern const llvm::MCWriteLatencyEntry LanaiWriteLatencyTable[];
236
extern const llvm::MCReadAdvanceEntry LanaiReadAdvanceTable[];
237
extern const llvm::InstrStage LanaiStages[];
238
extern const unsigned LanaiOperandCycles[];
239
extern const unsigned LanaiForwardingPaths[];
240
LanaiGenSubtargetInfo::LanaiGenSubtargetInfo(const Triple &TT, StringRef CPU, StringRef FS)
241
  : TargetSubtargetInfo(TT, CPU, FS, None, makeArrayRef(LanaiSubTypeKV, 2), 
242
                        LanaiWriteProcResTable, LanaiWriteLatencyTable, LanaiReadAdvanceTable, 
243
26
                        LanaiStages, LanaiOperandCycles, LanaiForwardingPaths) {}
244
245
unsigned LanaiGenSubtargetInfo
246
0
::resolveSchedClass(unsigned SchedClass, const MachineInstr *MI, const TargetSchedModel *SchedModel) const {
247
0
  report_fatal_error("Expected a variant SchedClass");
248
0
} // LanaiGenSubtargetInfo::resolveSchedClass
249
250
unsigned LanaiGenSubtargetInfo
251
0
::resolveVariantSchedClass(unsigned SchedClass, const MCInst *MI, unsigned CPUID) const {
252
0
  return Lanai_MC::resolveVariantSchedClassImpl(SchedClass, MI, CPUID);
253
0
} // LanaiGenSubtargetInfo::resolveVariantSchedClass
254
255
} // end namespace llvm
256
257
#endif // GET_SUBTARGETINFO_CTOR
258
259
260
#ifdef GET_STIPREDICATE_DECLS_FOR_MC_ANALYSIS
261
#undef GET_STIPREDICATE_DECLS_FOR_MC_ANALYSIS
262
263
#endif // GET_STIPREDICATE_DECLS_FOR_MC_ANALYSIS
264
265
266
#ifdef GET_STIPREDICATE_DEFS_FOR_MC_ANALYSIS
267
#undef GET_STIPREDICATE_DEFS_FOR_MC_ANALYSIS
268
269
#endif // GET_STIPREDICATE_DEFS_FOR_MC_ANALYSIS
270