@@ -19,13 +19,13 @@ void Matcher::anchor() {}
19
19
20
20
void Matcher::dump () const { print (errs ()); }
21
21
22
- void Matcher::print (raw_ostream &OS, unsigned Indent) const {
22
+ void Matcher::print (raw_ostream &OS, indent Indent) const {
23
23
printImpl (OS, Indent);
24
24
if (Next)
25
25
return Next->print (OS, Indent);
26
26
}
27
27
28
- void Matcher::printOne (raw_ostream &OS) const { printImpl (OS, 0 ); }
28
+ void Matcher::printOne (raw_ostream &OS) const { printImpl (OS, indent ( 0 ) ); }
29
29
30
30
// / unlinkNode - Unlink the specified node from this chain. If Other == this,
31
31
// / we unlink the next pointer and return it. Otherwise we unlink Other from
@@ -111,156 +111,150 @@ unsigned CheckPredicateMatcher::getOperandNo(unsigned i) const {
111
111
112
112
// printImpl methods.
113
113
114
- void ScopeMatcher::printImpl (raw_ostream &OS, unsigned Indent) const {
115
- OS. indent ( Indent) << " Scope\n " ;
114
+ void ScopeMatcher::printImpl (raw_ostream &OS, indent Indent) const {
115
+ OS << Indent << " Scope\n " ;
116
116
for (const Matcher *C : Children) {
117
117
if (!C)
118
- OS. indent ( Indent + 1 ) << " NULL POINTER\n " ;
118
+ OS << Indent + 1 << " NULL POINTER\n " ;
119
119
else
120
120
C->print (OS, Indent + 2 );
121
121
}
122
122
}
123
123
124
- void RecordMatcher::printImpl (raw_ostream &OS, unsigned Indent) const {
125
- OS. indent ( Indent) << " Record\n " ;
124
+ void RecordMatcher::printImpl (raw_ostream &OS, indent Indent) const {
125
+ OS << Indent << " Record\n " ;
126
126
}
127
127
128
- void RecordChildMatcher::printImpl (raw_ostream &OS, unsigned Indent) const {
129
- OS. indent ( Indent) << " RecordChild: " << ChildNo << ' \n ' ;
128
+ void RecordChildMatcher::printImpl (raw_ostream &OS, indent Indent) const {
129
+ OS << Indent << " RecordChild: " << ChildNo << ' \n ' ;
130
130
}
131
131
132
- void RecordMemRefMatcher::printImpl (raw_ostream &OS, unsigned Indent) const {
133
- OS. indent ( Indent) << " RecordMemRef\n " ;
132
+ void RecordMemRefMatcher::printImpl (raw_ostream &OS, indent Indent) const {
133
+ OS << Indent << " RecordMemRef\n " ;
134
134
}
135
135
136
- void CaptureGlueInputMatcher::printImpl (raw_ostream &OS,
137
- unsigned Indent) const {
138
- OS.indent (Indent) << " CaptureGlueInput\n " ;
136
+ void CaptureGlueInputMatcher::printImpl (raw_ostream &OS, indent Indent) const {
137
+ OS << Indent << " CaptureGlueInput\n " ;
139
138
}
140
139
141
- void MoveChildMatcher::printImpl (raw_ostream &OS, unsigned Indent) const {
142
- OS. indent ( Indent) << " MoveChild " << ChildNo << ' \n ' ;
140
+ void MoveChildMatcher::printImpl (raw_ostream &OS, indent Indent) const {
141
+ OS << Indent << " MoveChild " << ChildNo << ' \n ' ;
143
142
}
144
143
145
- void MoveSiblingMatcher::printImpl (raw_ostream &OS, unsigned Indent) const {
146
- OS. indent ( Indent) << " MoveSibling " << SiblingNo << ' \n ' ;
144
+ void MoveSiblingMatcher::printImpl (raw_ostream &OS, indent Indent) const {
145
+ OS << Indent << " MoveSibling " << SiblingNo << ' \n ' ;
147
146
}
148
147
149
- void MoveParentMatcher::printImpl (raw_ostream &OS, unsigned Indent) const {
150
- OS. indent ( Indent) << " MoveParent\n " ;
148
+ void MoveParentMatcher::printImpl (raw_ostream &OS, indent Indent) const {
149
+ OS << Indent << " MoveParent\n " ;
151
150
}
152
151
153
- void CheckSameMatcher::printImpl (raw_ostream &OS, unsigned Indent) const {
154
- OS. indent ( Indent) << " CheckSame " << MatchNumber << ' \n ' ;
152
+ void CheckSameMatcher::printImpl (raw_ostream &OS, indent Indent) const {
153
+ OS << Indent << " CheckSame " << MatchNumber << ' \n ' ;
155
154
}
156
155
157
- void CheckChildSameMatcher::printImpl (raw_ostream &OS, unsigned Indent) const {
158
- OS. indent ( Indent) << " CheckChild" << ChildNo << " Same\n " ;
156
+ void CheckChildSameMatcher::printImpl (raw_ostream &OS, indent Indent) const {
157
+ OS << Indent << " CheckChild" << ChildNo << " Same\n " ;
159
158
}
160
159
161
160
void CheckPatternPredicateMatcher::printImpl (raw_ostream &OS,
162
- unsigned Indent) const {
163
- OS. indent ( Indent) << " CheckPatternPredicate " << Predicate << ' \n ' ;
161
+ indent Indent) const {
162
+ OS << Indent << " CheckPatternPredicate " << Predicate << ' \n ' ;
164
163
}
165
164
166
- void CheckPredicateMatcher::printImpl (raw_ostream &OS, unsigned Indent) const {
167
- OS. indent ( Indent) << " CheckPredicate " << getPredicate ().getFnName () << ' \n ' ;
165
+ void CheckPredicateMatcher::printImpl (raw_ostream &OS, indent Indent) const {
166
+ OS << Indent << " CheckPredicate " << getPredicate ().getFnName () << ' \n ' ;
168
167
}
169
168
170
- void CheckOpcodeMatcher::printImpl (raw_ostream &OS, unsigned Indent) const {
171
- OS. indent ( Indent) << " CheckOpcode " << Opcode.getEnumName () << ' \n ' ;
169
+ void CheckOpcodeMatcher::printImpl (raw_ostream &OS, indent Indent) const {
170
+ OS << Indent << " CheckOpcode " << Opcode.getEnumName () << ' \n ' ;
172
171
}
173
172
174
- void SwitchOpcodeMatcher::printImpl (raw_ostream &OS, unsigned Indent) const {
175
- OS. indent ( Indent) << " SwitchOpcode: {\n " ;
173
+ void SwitchOpcodeMatcher::printImpl (raw_ostream &OS, indent Indent) const {
174
+ OS << Indent << " SwitchOpcode: {\n " ;
176
175
for (const auto &C : Cases) {
177
- OS. indent ( Indent) << " case " << C.first ->getEnumName () << " :\n " ;
176
+ OS << Indent << " case " << C.first ->getEnumName () << " :\n " ;
178
177
C.second ->print (OS, Indent + 2 );
179
178
}
180
- OS. indent ( Indent) << " }\n " ;
179
+ OS << Indent << " }\n " ;
181
180
}
182
181
183
- void CheckTypeMatcher::printImpl (raw_ostream &OS, unsigned Indent) const {
184
- OS. indent ( Indent) << " CheckType " << getEnumName (Type) << " , ResNo=" << ResNo
185
- << ' \n ' ;
182
+ void CheckTypeMatcher::printImpl (raw_ostream &OS, indent Indent) const {
183
+ OS << Indent << " CheckType " << getEnumName (Type) << " , ResNo=" << ResNo
184
+ << ' \n ' ;
186
185
}
187
186
188
- void SwitchTypeMatcher::printImpl (raw_ostream &OS, unsigned Indent) const {
189
- OS. indent ( Indent) << " SwitchType: {\n " ;
187
+ void SwitchTypeMatcher::printImpl (raw_ostream &OS, indent Indent) const {
188
+ OS << Indent << " SwitchType: {\n " ;
190
189
for (const auto &C : Cases) {
191
- OS. indent ( Indent) << " case " << getEnumName (C.first ) << " :\n " ;
190
+ OS << Indent << " case " << getEnumName (C.first ) << " :\n " ;
192
191
C.second ->print (OS, Indent + 2 );
193
192
}
194
- OS. indent ( Indent) << " }\n " ;
193
+ OS << Indent << " }\n " ;
195
194
}
196
195
197
- void CheckChildTypeMatcher::printImpl (raw_ostream &OS, unsigned Indent) const {
198
- OS. indent ( Indent) << " CheckChildType " << ChildNo << " " << getEnumName (Type)
199
- << ' \n ' ;
196
+ void CheckChildTypeMatcher::printImpl (raw_ostream &OS, indent Indent) const {
197
+ OS << Indent << " CheckChildType " << ChildNo << " " << getEnumName (Type)
198
+ << ' \n ' ;
200
199
}
201
200
202
- void CheckIntegerMatcher::printImpl (raw_ostream &OS, unsigned Indent) const {
203
- OS. indent ( Indent) << " CheckInteger " << Value << ' \n ' ;
201
+ void CheckIntegerMatcher::printImpl (raw_ostream &OS, indent Indent) const {
202
+ OS << Indent << " CheckInteger " << Value << ' \n ' ;
204
203
}
205
204
206
- void CheckChildIntegerMatcher::printImpl (raw_ostream &OS,
207
- unsigned Indent) const {
208
- OS.indent (Indent) << " CheckChildInteger " << ChildNo << " " << Value << ' \n ' ;
205
+ void CheckChildIntegerMatcher::printImpl (raw_ostream &OS, indent Indent) const {
206
+ OS << Indent << " CheckChildInteger " << ChildNo << " " << Value << ' \n ' ;
209
207
}
210
208
211
- void CheckCondCodeMatcher::printImpl (raw_ostream &OS, unsigned Indent) const {
212
- OS. indent ( Indent) << " CheckCondCode ISD::" << CondCodeName << ' \n ' ;
209
+ void CheckCondCodeMatcher::printImpl (raw_ostream &OS, indent Indent) const {
210
+ OS << Indent << " CheckCondCode ISD::" << CondCodeName << ' \n ' ;
213
211
}
214
212
215
213
void CheckChild2CondCodeMatcher::printImpl (raw_ostream &OS,
216
- unsigned Indent) const {
217
- OS. indent ( Indent) << " CheckChild2CondCode ISD::" << CondCodeName << ' \n ' ;
214
+ indent Indent) const {
215
+ OS << Indent << " CheckChild2CondCode ISD::" << CondCodeName << ' \n ' ;
218
216
}
219
217
220
- void CheckValueTypeMatcher::printImpl (raw_ostream &OS, unsigned Indent) const {
221
- OS. indent ( Indent) << " CheckValueType " << getEnumName (VT) << ' \n ' ;
218
+ void CheckValueTypeMatcher::printImpl (raw_ostream &OS, indent Indent) const {
219
+ OS << Indent << " CheckValueType " << getEnumName (VT) << ' \n ' ;
222
220
}
223
221
224
- void CheckComplexPatMatcher::printImpl (raw_ostream &OS, unsigned Indent) const {
225
- OS. indent ( Indent) << " CheckComplexPat " << Pattern.getSelectFunc () << ' \n ' ;
222
+ void CheckComplexPatMatcher::printImpl (raw_ostream &OS, indent Indent) const {
223
+ OS << Indent << " CheckComplexPat " << Pattern.getSelectFunc () << ' \n ' ;
226
224
}
227
225
228
- void CheckAndImmMatcher::printImpl (raw_ostream &OS, unsigned Indent) const {
229
- OS. indent ( Indent) << " CheckAndImm " << Value << ' \n ' ;
226
+ void CheckAndImmMatcher::printImpl (raw_ostream &OS, indent Indent) const {
227
+ OS << Indent << " CheckAndImm " << Value << ' \n ' ;
230
228
}
231
229
232
- void CheckOrImmMatcher::printImpl (raw_ostream &OS, unsigned Indent) const {
233
- OS. indent ( Indent) << " CheckOrImm " << Value << ' \n ' ;
230
+ void CheckOrImmMatcher::printImpl (raw_ostream &OS, indent Indent) const {
231
+ OS << Indent << " CheckOrImm " << Value << ' \n ' ;
234
232
}
235
233
236
234
void CheckFoldableChainNodeMatcher::printImpl (raw_ostream &OS,
237
- unsigned Indent) const {
238
- OS. indent ( Indent) << " CheckFoldableChainNode\n " ;
235
+ indent Indent) const {
236
+ OS << Indent << " CheckFoldableChainNode\n " ;
239
237
}
240
238
241
- void CheckImmAllOnesVMatcher::printImpl (raw_ostream &OS,
242
- unsigned Indent) const {
243
- OS.indent (Indent) << " CheckAllOnesV\n " ;
239
+ void CheckImmAllOnesVMatcher::printImpl (raw_ostream &OS, indent Indent) const {
240
+ OS << Indent << " CheckAllOnesV\n " ;
244
241
}
245
242
246
- void CheckImmAllZerosVMatcher::printImpl (raw_ostream &OS,
247
- unsigned Indent) const {
248
- OS.indent (Indent) << " CheckAllZerosV\n " ;
243
+ void CheckImmAllZerosVMatcher::printImpl (raw_ostream &OS, indent Indent) const {
244
+ OS << Indent << " CheckAllZerosV\n " ;
249
245
}
250
246
251
- void EmitIntegerMatcher::printImpl (raw_ostream &OS, unsigned Indent) const {
252
- OS.indent (Indent) << " EmitInteger " << Val << " VT=" << getEnumName (VT)
253
- << ' \n ' ;
247
+ void EmitIntegerMatcher::printImpl (raw_ostream &OS, indent Indent) const {
248
+ OS << Indent << " EmitInteger " << Val << " VT=" << getEnumName (VT) << ' \n ' ;
254
249
}
255
250
256
- void EmitStringIntegerMatcher::printImpl (raw_ostream &OS,
257
- unsigned Indent) const {
258
- OS.indent (Indent) << " EmitStringInteger " << Val << " VT=" << getEnumName (VT)
259
- << ' \n ' ;
251
+ void EmitStringIntegerMatcher::printImpl (raw_ostream &OS, indent Indent) const {
252
+ OS << Indent << " EmitStringInteger " << Val << " VT=" << getEnumName (VT)
253
+ << ' \n ' ;
260
254
}
261
255
262
- void EmitRegisterMatcher::printImpl (raw_ostream &OS, unsigned Indent) const {
263
- OS. indent ( Indent) << " EmitRegister " ;
256
+ void EmitRegisterMatcher::printImpl (raw_ostream &OS, indent Indent) const {
257
+ OS << Indent << " EmitRegister " ;
264
258
if (Reg)
265
259
OS << Reg->getName ();
266
260
else
@@ -269,26 +263,26 @@ void EmitRegisterMatcher::printImpl(raw_ostream &OS, unsigned Indent) const {
269
263
}
270
264
271
265
void EmitConvertToTargetMatcher::printImpl (raw_ostream &OS,
272
- unsigned Indent) const {
273
- OS. indent ( Indent) << " EmitConvertToTarget " << Slot << ' \n ' ;
266
+ indent Indent) const {
267
+ OS << Indent << " EmitConvertToTarget " << Slot << ' \n ' ;
274
268
}
275
269
276
270
void EmitMergeInputChainsMatcher::printImpl (raw_ostream &OS,
277
- unsigned Indent) const {
278
- OS. indent ( Indent) << " EmitMergeInputChains <todo: args>\n " ;
271
+ indent Indent) const {
272
+ OS << Indent << " EmitMergeInputChains <todo: args>\n " ;
279
273
}
280
274
281
- void EmitCopyToRegMatcher::printImpl (raw_ostream &OS, unsigned Indent) const {
282
- OS. indent ( Indent) << " EmitCopyToReg <todo: args>\n " ;
275
+ void EmitCopyToRegMatcher::printImpl (raw_ostream &OS, indent Indent) const {
276
+ OS << Indent << " EmitCopyToReg <todo: args>\n " ;
283
277
}
284
278
285
- void EmitNodeXFormMatcher::printImpl (raw_ostream &OS, unsigned Indent) const {
286
- OS. indent ( Indent) << " EmitNodeXForm " << NodeXForm->getName ()
287
- << " Slot= " << Slot << ' \n ' ;
279
+ void EmitNodeXFormMatcher::printImpl (raw_ostream &OS, indent Indent) const {
280
+ OS << Indent << " EmitNodeXForm " << NodeXForm->getName () << " Slot= " << Slot
281
+ << ' \n ' ;
288
282
}
289
283
290
- void EmitNodeMatcherCommon::printImpl (raw_ostream &OS, unsigned Indent) const {
291
- OS. indent ( Indent) ;
284
+ void EmitNodeMatcherCommon::printImpl (raw_ostream &OS, indent Indent) const {
285
+ OS << Indent;
292
286
OS << (isa<MorphNodeToMatcher>(this ) ? " MorphNodeTo: " : " EmitNode: " )
293
287
<< CGI.Namespace << " ::" << CGI.TheDef ->getName () << " : <todo flags> " ;
294
288
@@ -300,10 +294,10 @@ void EmitNodeMatcherCommon::printImpl(raw_ostream &OS, unsigned Indent) const {
300
294
OS << " )\n " ;
301
295
}
302
296
303
- void CompleteMatchMatcher::printImpl (raw_ostream &OS, unsigned Indent) const {
304
- OS. indent ( Indent) << " CompleteMatch <todo args>\n " ;
305
- OS. indent ( Indent) << " Src = " << Pattern.getSrcPattern () << " \n " ;
306
- OS. indent ( Indent) << " Dst = " << Pattern.getDstPattern () << " \n " ;
297
+ void CompleteMatchMatcher::printImpl (raw_ostream &OS, indent Indent) const {
298
+ OS << Indent << " CompleteMatch <todo args>\n " ;
299
+ OS << Indent << " Src = " << Pattern.getSrcPattern () << " \n " ;
300
+ OS << Indent << " Dst = " << Pattern.getDstPattern () << " \n " ;
307
301
}
308
302
309
303
bool CheckOpcodeMatcher::isEqualImpl (const Matcher *M) const {
0 commit comments