LLVM: include/llvm/Remarks/Remark.h Source File (original) (raw)
1
2
3
4
5
6
7
8
9
10
11
12
13#ifndef LLVM_REMARKS_REMARK_H
14#define LLVM_REMARKS_REMARK_H
15
22#include
23#include
24
25namespace llvm {
27
28
30
31
41
42
44
45
46
49
51
53
56
57
59
60
61 template
62 std::optional getValAsInt(unsigned Radix = 10) const {
64 T Res;
65 if (Str.consumeInteger<T>(Radix, Res) || !Str.empty())
66 return std::nullopt;
67 return Res;
68 }
69};
70
71
73
74
86
88 switch (Ty) {
90 return "Unknown";
92 return "Missed";
94 return "Passed";
96 return "Analysis";
98 return "AnalysisFPCommute";
100 return "AnalysisAliasing";
101 default:
102 return "Failure";
103 }
104}
105
106
108
110
111
113
114
115
116
118
119
121
122
124
125
126
128
129
131
135
136
138
139
140
142
143
145
146
148
149private:
150
151
154};
155
156
158
159
160
161template
162bool operator<(const std::optional &LHS, const std::optional &RHS) {
163
164
165
167 return false;
169 return true;
171 return false;
173}
174
176 return LHS.SourceFilePath == RHS.SourceFilePath &&
177 LHS.SourceLine == RHS.SourceLine &&
178 LHS.SourceColumn == RHS.SourceColumn;
179}
180
183}
184
186 return std::make_tuple(LHS.SourceFilePath, LHS.SourceLine, LHS.SourceColumn) <
187 std::make_tuple(RHS.SourceFilePath, RHS.SourceLine, RHS.SourceColumn);
188}
189
193
196}
197
199 return std::make_tuple(LHS.Key, LHS.Val, LHS.Loc) <
200 std::make_tuple(RHS.Key, RHS.Val, RHS.Loc);
201}
202
204 return LHS.RemarkType == RHS.RemarkType && LHS.PassName == RHS.PassName &&
205 LHS.RemarkName == RHS.RemarkName &&
206 LHS.FunctionName == RHS.FunctionName && LHS.Loc == RHS.Loc &&
207 LHS.Hotness == RHS.Hotness && LHS.Args == RHS.Args;
208}
209
212}
213
215 return std::make_tuple(LHS.RemarkType, LHS.PassName, LHS.RemarkName,
216 LHS.FunctionName, LHS.Loc, LHS.Hotness, LHS.Args) <
217 std::make_tuple(RHS.RemarkType, RHS.PassName, RHS.RemarkName,
218 RHS.FunctionName, RHS.Loc, RHS.Hotness, RHS.Args);
219}
220
225
230
235
236}
237}
238
239#endif
#define DEFINE_SIMPLE_CONVERSION_FUNCTIONS(ty, ref)
This file defines the SmallVector class.
This class represents an incoming formal argument to a Function.
This is a 'vector' (really, a variable-sized array), optimized for the case when the array is small.
StringRef - Represent a constant reference to a string, i.e.
This class implements an extremely fast bulk output stream that can only output to a stream.
This is an optimization pass for GlobalISel generic memory operations.
Printable print(const GCNRegPressure &RP, const GCNSubtarget *ST=nullptr, unsigned DynamicVGPRBlockSize=0)
LLVM_ATTRIBUTE_VISIBILITY_DEFAULT AnalysisKey InnerAnalysisManagerProxy< AnalysisManagerT, IRUnitT, ExtraArgTs... >::Key