Coverage Report

Created: 2019-03-24 22:13

/Users/buildslave/jenkins/workspace/clang-stage2-coverage-R/clang-build/lib/Target/XCore/XCoreGenSubtargetInfo.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
// ===============================================================
34
// Data tables for the new per-operand machine model.
35
36
// {ProcResourceIdx, Cycles}
37
extern const llvm::MCWriteProcResEntry XCoreWriteProcResTable[] = {
38
  { 0,  0}, // Invalid
39
}; // XCoreWriteProcResTable
40
41
// {Cycles, WriteResourceID}
42
extern const llvm::MCWriteLatencyEntry XCoreWriteLatencyTable[] = {
43
  { 0,  0}, // Invalid
44
}; // XCoreWriteLatencyTable
45
46
// {UseIdx, WriteResourceID, Cycles}
47
extern const llvm::MCReadAdvanceEntry XCoreReadAdvanceTable[] = {
48
  {0,  0,  0}, // Invalid
49
}; // XCoreReadAdvanceTable
50
51
#undef DBGFIELD
52
53
static const llvm::MCSchedModel NoSchedModel = {
54
  MCSchedModel::DefaultIssueWidth,
55
  MCSchedModel::DefaultMicroOpBufferSize,
56
  MCSchedModel::DefaultLoopMicroOpBufferSize,
57
  MCSchedModel::DefaultLoadLatency,
58
  MCSchedModel::DefaultHighLatency,
59
  MCSchedModel::DefaultMispredictPenalty,
60
  false, // PostRAScheduler
61
  false, // CompleteModel
62
  0, // Processor ID
63
  nullptr, nullptr, 0, 0, // No instruction-level machine model.
64
  nullptr, // No Itinerary
65
  nullptr // No extra processor descriptor
66
};
67
68
// Sorted (by key) array of values for CPU subtype.
69
extern const llvm::SubtargetSubTypeKV XCoreSubTypeKV[] = {
70
 { "generic", { { { 0x0ULL, 0x0ULL, 0x0ULL, } } }, &NoSchedModel },
71
 { "xs1b-generic", { { { 0x0ULL, 0x0ULL, 0x0ULL, } } }, &NoSchedModel },
72
};
73
74
namespace XCore_MC {
75
unsigned resolveVariantSchedClassImpl(unsigned SchedClass,
76
0
    const MCInst *MI, unsigned CPUID) {
77
0
  // Don't know how to resolve this scheduling class.
78
0
  return 0;
79
0
}
80
} // end of namespace XCore_MC
81
82
struct XCoreGenMCSubtargetInfo : public MCSubtargetInfo {
83
  XCoreGenMCSubtargetInfo(const Triple &TT, 
84
    StringRef CPU, StringRef FS, ArrayRef<SubtargetFeatureKV> PF,
85
    ArrayRef<SubtargetSubTypeKV> PD,
86
    const MCWriteProcResEntry *WPR,
87
    const MCWriteLatencyEntry *WL,
88
    const MCReadAdvanceEntry *RA, const InstrStage *IS,
89
    const unsigned *OC, const unsigned *FP) :
90
      MCSubtargetInfo(TT, CPU, FS, PF, PD,
91
81
                      WPR, WL, RA, IS, OC, FP) { }
92
93
  unsigned resolveVariantSchedClass(unsigned SchedClass,
94
0
      const MCInst *MI, unsigned CPUID) const override {
95
0
    return XCore_MC::resolveVariantSchedClassImpl(SchedClass, MI, CPUID); 
96
0
  }
97
};
98
99
81
static inline MCSubtargetInfo *createXCoreMCSubtargetInfoImpl(const Triple &TT, StringRef CPU, StringRef FS) {
100
81
  return new XCoreGenMCSubtargetInfo(TT, CPU, FS, None, XCoreSubTypeKV, 
101
81
                      XCoreWriteProcResTable, XCoreWriteLatencyTable, XCoreReadAdvanceTable, 
102
81
                      nullptr, nullptr, nullptr);
103
81
}
104
105
} // end namespace llvm
106
107
#endif // GET_SUBTARGETINFO_MC_DESC
108
109
110
#ifdef GET_SUBTARGETINFO_TARGET_DESC
111
#undef GET_SUBTARGETINFO_TARGET_DESC
112
113
#include "llvm/Support/Debug.h"
114
#include "llvm/Support/raw_ostream.h"
115
116
// ParseSubtargetFeatures - Parses features string setting specified
117
// subtarget options.
118
0
void llvm::XCoreSubtarget::ParseSubtargetFeatures(StringRef CPU, StringRef FS) {
119
0
  LLVM_DEBUG(dbgs() << "\nFeatures:" << FS);
120
0
  LLVM_DEBUG(dbgs() << "\nCPU:" << CPU << "\n\n");
121
0
}
122
#endif // GET_SUBTARGETINFO_TARGET_DESC
123
124
125
#ifdef GET_SUBTARGETINFO_HEADER
126
#undef GET_SUBTARGETINFO_HEADER
127
128
namespace llvm {
129
class DFAPacketizer;
130
namespace XCore_MC {
131
unsigned resolveVariantSchedClassImpl(unsigned SchedClass, const MCInst *MI, unsigned CPUID);
132
}
133
134
struct XCoreGenSubtargetInfo : public TargetSubtargetInfo {
135
  explicit XCoreGenSubtargetInfo(const Triple &TT, StringRef CPU, StringRef FS);
136
public:
137
  unsigned resolveSchedClass(unsigned SchedClass,  const MachineInstr *DefMI, const TargetSchedModel *SchedModel) const override;
138
  unsigned resolveVariantSchedClass(unsigned SchedClass, const MCInst *MI, unsigned CPUID) const override;
139
  DFAPacketizer *createDFAPacketizer(const InstrItineraryData *IID) const;
140
};
141
} // end namespace llvm
142
143
#endif // GET_SUBTARGETINFO_HEADER
144
145
146
#ifdef GET_SUBTARGETINFO_CTOR
147
#undef GET_SUBTARGETINFO_CTOR
148
149
#include "llvm/CodeGen/TargetSchedule.h"
150
151
namespace llvm {
152
extern const llvm::SubtargetFeatureKV XCoreFeatureKV[];
153
extern const llvm::SubtargetSubTypeKV XCoreSubTypeKV[];
154
extern const llvm::MCWriteProcResEntry XCoreWriteProcResTable[];
155
extern const llvm::MCWriteLatencyEntry XCoreWriteLatencyTable[];
156
extern const llvm::MCReadAdvanceEntry XCoreReadAdvanceTable[];
157
XCoreGenSubtargetInfo::XCoreGenSubtargetInfo(const Triple &TT, StringRef CPU, StringRef FS)
158
  : TargetSubtargetInfo(TT, CPU, FS, None, makeArrayRef(XCoreSubTypeKV, 2), 
159
                        XCoreWriteProcResTable, XCoreWriteLatencyTable, XCoreReadAdvanceTable, 
160
80
                        nullptr, nullptr, nullptr) {}
161
162
unsigned XCoreGenSubtargetInfo
163
0
::resolveSchedClass(unsigned SchedClass, const MachineInstr *MI, const TargetSchedModel *SchedModel) const {
164
0
  report_fatal_error("Expected a variant SchedClass");
165
0
} // XCoreGenSubtargetInfo::resolveSchedClass
166
167
unsigned XCoreGenSubtargetInfo
168
0
::resolveVariantSchedClass(unsigned SchedClass, const MCInst *MI, unsigned CPUID) const {
169
0
  return XCore_MC::resolveVariantSchedClassImpl(SchedClass, MI, CPUID);
170
0
} // XCoreGenSubtargetInfo::resolveVariantSchedClass
171
172
} // end namespace llvm
173
174
#endif // GET_SUBTARGETINFO_CTOR
175
176
177
#ifdef GET_STIPREDICATE_DECLS_FOR_MC_ANALYSIS
178
#undef GET_STIPREDICATE_DECLS_FOR_MC_ANALYSIS
179
180
#endif // GET_STIPREDICATE_DECLS_FOR_MC_ANALYSIS
181
182
183
#ifdef GET_STIPREDICATE_DEFS_FOR_MC_ANALYSIS
184
#undef GET_STIPREDICATE_DEFS_FOR_MC_ANALYSIS
185
186
#endif // GET_STIPREDICATE_DEFS_FOR_MC_ANALYSIS
187