Skip to content

Commit 7cee4c7

Browse files
committed
[CallingConvLower] Use MCRegister. NFC
1 parent 9f8e148 commit 7cee4c7

File tree

2 files changed

+5
-5
lines changed

2 files changed

+5
-5
lines changed

llvm/include/llvm/CodeGen/CallingConvLower.h

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -493,7 +493,7 @@ class CCState {
493493
/// the given value type. This is useful when varargs are passed in the
494494
/// registers that normal prototyped parameters would be passed in, or for
495495
/// implementing perfect forwarding.
496-
void getRemainingRegParmsForType(SmallVectorImpl<MCPhysReg> &Regs, MVT VT,
496+
void getRemainingRegParmsForType(SmallVectorImpl<MCRegister> &Regs, MVT VT,
497497
CCAssignFn Fn);
498498

499499
/// Compute the set of registers that need to be preserved and forwarded to

llvm/lib/CodeGen/CallingConvLower.cpp

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -198,7 +198,7 @@ static bool isValueTypeInRegForCC(CallingConv::ID CC, MVT VT) {
198198
return (CC == CallingConv::X86_VectorCall || CC == CallingConv::X86_FastCall);
199199
}
200200

201-
void CCState::getRemainingRegParmsForType(SmallVectorImpl<MCPhysReg> &Regs,
201+
void CCState::getRemainingRegParmsForType(SmallVectorImpl<MCRegister> &Regs,
202202
MVT VT, CCAssignFn Fn) {
203203
uint64_t SavedStackSize = StackSize;
204204
Align SavedMaxStackArgAlign = MaxStackArgAlign;
@@ -227,7 +227,7 @@ void CCState::getRemainingRegParmsForType(SmallVectorImpl<MCPhysReg> &Regs,
227227
assert(NumLocs < Locs.size() && "CC assignment failed to add location");
228228
for (unsigned I = NumLocs, E = Locs.size(); I != E; ++I)
229229
if (Locs[I].isRegLoc())
230-
Regs.push_back(MCPhysReg(Locs[I].getLocReg()));
230+
Regs.push_back(Locs[I].getLocReg());
231231

232232
// Clear the assigned values and stack memory. We leave the registers marked
233233
// as allocated so that future queries don't return the same registers, i.e.
@@ -247,11 +247,11 @@ void CCState::analyzeMustTailForwardedRegisters(
247247
SaveAndRestore SavedMustTail(AnalyzingMustTailForwardedRegs, true);
248248

249249
for (MVT RegVT : RegParmTypes) {
250-
SmallVector<MCPhysReg, 8> RemainingRegs;
250+
SmallVector<MCRegister, 8> RemainingRegs;
251251
getRemainingRegParmsForType(RemainingRegs, RegVT, Fn);
252252
const TargetLowering *TL = MF.getSubtarget().getTargetLowering();
253253
const TargetRegisterClass *RC = TL->getRegClassFor(RegVT);
254-
for (MCPhysReg PReg : RemainingRegs) {
254+
for (MCRegister PReg : RemainingRegs) {
255255
Register VReg = MF.addLiveIn(PReg, RC);
256256
Forwards.push_back(ForwardedRegister(VReg, PReg, RegVT));
257257
}

0 commit comments

Comments
 (0)