@@ -195,9 +195,7 @@ static bool isValueTypeInRegForCC(CallingConv::ID CC, MVT VT) {
195
195
return true ; // Assume -msse-regparm might be in effect.
196
196
if (!VT.isInteger ())
197
197
return false ;
198
- if (CC == CallingConv::X86_VectorCall || CC == CallingConv::X86_FastCall)
199
- return true ;
200
- return false ;
198
+ return (CC == CallingConv::X86_VectorCall || CC == CallingConv::X86_FastCall);
201
199
}
202
200
203
201
void CCState::getRemainingRegParmsForType (SmallVectorImpl<MCPhysReg> &Regs,
@@ -213,8 +211,8 @@ void CCState::getRemainingRegParmsForType(SmallVectorImpl<MCPhysReg> &Regs,
213
211
214
212
// Allocate something of this value type repeatedly until we get assigned a
215
213
// location in memory.
216
- bool HaveRegParm = true ;
217
- while (HaveRegParm) {
214
+ bool HaveRegParm;
215
+ do {
218
216
if (Fn (0 , VT, VT, CCValAssign::Full, Flags, *this )) {
219
217
#ifndef NDEBUG
220
218
dbgs () << " Call has unhandled type " << EVT (VT).getEVTString ()
@@ -223,7 +221,7 @@ void CCState::getRemainingRegParmsForType(SmallVectorImpl<MCPhysReg> &Regs,
223
221
llvm_unreachable (nullptr );
224
222
}
225
223
HaveRegParm = Locs.back ().isRegLoc ();
226
- }
224
+ } while (HaveRegParm);
227
225
228
226
// Copy all the registers from the value locations we added.
229
227
assert (NumLocs < Locs.size () && " CC assignment failed to add location" );
@@ -254,7 +252,7 @@ void CCState::analyzeMustTailForwardedRegisters(
254
252
const TargetLowering *TL = MF.getSubtarget ().getTargetLowering ();
255
253
const TargetRegisterClass *RC = TL->getRegClassFor (RegVT);
256
254
for (MCPhysReg PReg : RemainingRegs) {
257
- unsigned VReg = MF.addLiveIn (PReg, RC);
255
+ Register VReg = MF.addLiveIn (PReg, RC);
258
256
Forwards.push_back (ForwardedRegister (VReg, PReg, RegVT));
259
257
}
260
258
}
0 commit comments