@@ -35,12 +35,12 @@ class CallingConvEmitter {
35
35
public:
36
36
explicit CallingConvEmitter (const RecordKeeper &R) : Records(R) {}
37
37
38
- void run (raw_ostream &o );
38
+ void run (raw_ostream &O );
39
39
40
40
private:
41
- void EmitCallingConv (const Record *CC, raw_ostream &O);
42
- void EmitAction (const Record *Action, indent Indent, raw_ostream &O);
43
- void EmitArgRegisterLists (raw_ostream &O);
41
+ void emitCallingConv (const Record *CC, raw_ostream &O);
42
+ void emitAction (const Record *Action, indent Indent, raw_ostream &O);
43
+ void emitArgRegisterLists (raw_ostream &O);
44
44
};
45
45
} // End anonymous namespace
46
46
@@ -75,16 +75,16 @@ void CallingConvEmitter::run(raw_ostream &O) {
75
75
Records.getTimer ().startTimer (" Emit full descriptions" );
76
76
for (const Record *CC : CCs) {
77
77
if (!CC->getValueAsBit (" Custom" )) {
78
- EmitCallingConv (CC, O);
78
+ emitCallingConv (CC, O);
79
79
}
80
80
}
81
81
82
- EmitArgRegisterLists (O);
82
+ emitArgRegisterLists (O);
83
83
84
84
O << " \n #endif // CC_REGISTER_LIST\n " ;
85
85
}
86
86
87
- void CallingConvEmitter::EmitCallingConv (const Record *CC, raw_ostream &O) {
87
+ void CallingConvEmitter::emitCallingConv (const Record *CC, raw_ostream &O) {
88
88
const ListInit *CCActions = CC->getValueAsListInit (" Actions" );
89
89
Counter = 0 ;
90
90
@@ -107,8 +107,8 @@ void CallingConvEmitter::EmitCallingConv(const Record *CC, raw_ostream &O) {
107
107
<< std::string (Pad, ' ' ) << " MVT LocVT, CCValAssign::LocInfo LocInfo,\n "
108
108
<< std::string (Pad, ' ' ) << " ISD::ArgFlagsTy ArgFlags, CCState &State) {\n " ;
109
109
// Emit all of the actions, in order.
110
- for (unsigned i = 0 , e = CCActions->size (); i != e ; ++i ) {
111
- const Record *Action = CCActions->getElementAsRecord (i );
110
+ for (unsigned I = 0 , E = CCActions->size (); I != E ; ++I ) {
111
+ const Record *Action = CCActions->getElementAsRecord (I );
112
112
SwiftAction =
113
113
llvm::any_of (Action->getSuperClasses (),
114
114
[](const std::pair<const Record *, SMRange> &Class) {
@@ -117,23 +117,23 @@ void CallingConvEmitter::EmitCallingConv(const Record *CC, raw_ostream &O) {
117
117
});
118
118
119
119
O << " \n " ;
120
- EmitAction (Action, indent (2 ), O);
120
+ emitAction (Action, indent (2 ), O);
121
121
}
122
122
123
123
O << " \n return true; // CC didn't match.\n " ;
124
124
O << " }\n " ;
125
125
}
126
126
127
- void CallingConvEmitter::EmitAction (const Record *Action, indent Indent,
127
+ void CallingConvEmitter::emitAction (const Record *Action, indent Indent,
128
128
raw_ostream &O) {
129
129
if (Action->isSubClassOf (" CCPredicateAction" )) {
130
130
O << Indent << " if (" ;
131
131
132
132
if (Action->isSubClassOf (" CCIfType" )) {
133
133
const ListInit *VTs = Action->getValueAsListInit (" VTs" );
134
- for (unsigned i = 0 , e = VTs->size (); i != e ; ++i ) {
135
- const Record *VT = VTs->getElementAsRecord (i );
136
- if (i != 0 )
134
+ for (unsigned I = 0 , E = VTs->size (); I != E ; ++I ) {
135
+ const Record *VT = VTs->getElementAsRecord (I );
136
+ if (I != 0 )
137
137
O << " ||\n " << Indent;
138
138
O << " LocVT == " << getEnumName (getValueType (VT));
139
139
}
@@ -146,7 +146,7 @@ void CallingConvEmitter::EmitAction(const Record *Action, indent Indent,
146
146
}
147
147
148
148
O << " ) {\n " ;
149
- EmitAction (Action->getValueAsDef (" SubAction" ), Indent + 2 , O);
149
+ emitAction (Action->getValueAsDef (" SubAction" ), Indent + 2 , O);
150
150
O << Indent << " }\n " ;
151
151
} else {
152
152
if (Action->isSubClassOf (" CCDelegateTo" )) {
@@ -171,8 +171,8 @@ void CallingConvEmitter::EmitAction(const Record *Action, indent Indent,
171
171
<< " [] = {\n " ;
172
172
O << Indent << " " ;
173
173
ListSeparator LS;
174
- for (unsigned i = 0 , e = RegList->size (); i != e ; ++i ) {
175
- std::string Name = getQualifiedName (RegList->getElementAsRecord (i ));
174
+ for (unsigned I = 0 , E = RegList->size (); I != E ; ++I ) {
175
+ std::string Name = getQualifiedName (RegList->getElementAsRecord (I ));
176
176
if (SwiftAction)
177
177
AssignedSwiftRegsMap[CurrentAction].insert (Name);
178
178
else
@@ -230,16 +230,16 @@ void CallingConvEmitter::EmitAction(const Record *Action, indent Indent,
230
230
<< " [] = {\n " ;
231
231
O << Indent << " " ;
232
232
ListSeparator LS;
233
- for (unsigned i = 0 , e = RegList->size (); i != e ; ++i )
234
- O << LS << getQualifiedName (RegList->getElementAsRecord (i ));
233
+ for (unsigned I = 0 , E = RegList->size (); I != E ; ++I )
234
+ O << LS << getQualifiedName (RegList->getElementAsRecord (I ));
235
235
O << " \n " << Indent << " };\n " ;
236
236
237
237
O << Indent << " static const MCPhysReg RegList" << ShadowRegListNumber
238
238
<< " [] = {\n " ;
239
239
O << Indent << " " ;
240
240
ListSeparator LSS;
241
- for (unsigned i = 0 , e = ShadowRegList->size (); i != e ; ++i )
242
- O << LSS << getQualifiedName (ShadowRegList->getElementAsRecord (i ));
241
+ for (unsigned I = 0 , E = ShadowRegList->size (); I != E ; ++I )
242
+ O << LSS << getQualifiedName (ShadowRegList->getElementAsRecord (I ));
243
243
O << " \n " << Indent << " };\n " ;
244
244
245
245
O << Indent << " if (MCRegister Reg = State.AllocateReg(RegList"
@@ -287,8 +287,8 @@ void CallingConvEmitter::EmitAction(const Record *Action, indent Indent,
287
287
<< ShadowRegListNumber << " [] = {\n " ;
288
288
O << Indent << " " ;
289
289
ListSeparator LS;
290
- for (unsigned i = 0 , e = ShadowRegList->size (); i != e ; ++i )
291
- O << LS << getQualifiedName (ShadowRegList->getElementAsRecord (i ));
290
+ for (unsigned I = 0 , E = ShadowRegList->size (); I != E ; ++I )
291
+ O << LS << getQualifiedName (ShadowRegList->getElementAsRecord (I ));
292
292
O << " \n " << Indent << " };\n " ;
293
293
294
294
O << Indent << " int64_t Offset" << ++Counter << " = State.AllocateStack("
@@ -357,7 +357,7 @@ void CallingConvEmitter::EmitAction(const Record *Action, indent Indent,
357
357
}
358
358
}
359
359
360
- void CallingConvEmitter::EmitArgRegisterLists (raw_ostream &O) {
360
+ void CallingConvEmitter::emitArgRegisterLists (raw_ostream &O) {
361
361
// Transitively merge all delegated CCs into AssignedRegsMap.
362
362
using EntryTy = std::pair<std::string, std::set<std::string>>;
363
363
bool Redo;
0 commit comments