Optional<int> FPSaveIndex = FuncInfo->FramePointerSaveIndex;
Optional<int> BPSaveIndex = FuncInfo->BasePointerSaveIndex;
- for (const SIMachineFunctionInfo::SGPRSpillVGPRCSR &Reg
- : FuncInfo->getSGPRSpillVGPRs()) {
+ for (const SIMachineFunctionInfo::SGPRSpillVGPR &Reg :
+ FuncInfo->getSGPRSpillVGPRs()) {
if (!Reg.FI.hasValue())
continue;
}
}
- for (const SIMachineFunctionInfo::SGPRSpillVGPRCSR &Reg :
+ for (const SIMachineFunctionInfo::SGPRSpillVGPR &Reg :
FuncInfo->getSGPRSpillVGPRs()) {
if (!Reg.FI.hasValue())
continue;
SpillFI = FrameInfo.CreateSpillStackObject(4, Align(4));
}
- SpillVGPRs.push_back(SGPRSpillVGPRCSR(LaneVGPR, SpillFI));
+ SpillVGPRs.push_back(SGPRSpillVGPR(LaneVGPR, SpillFI));
// Add this register as live-in to all blocks to avoid machine verifer
// complaining about use of an undefined physical register.
MF.getRegInfo(), &AMDGPU::VGPR_32RegClass, MF, true);
if (LaneVGPR == Register())
return false;
- SpillVGPRs.push_back(SGPRSpillVGPRCSR(LaneVGPR, None));
+ SpillVGPRs.push_back(SGPRSpillVGPR(LaneVGPR, None));
FuncInfo->VGPRReservedForSGPRSpill = LaneVGPR;
return true;
}
bool hasReg() { return VGPR != 0;}
};
- struct SGPRSpillVGPRCSR {
+ struct SGPRSpillVGPR {
// VGPR used for SGPR spills
Register VGPR;
- // If the VGPR is a CSR, the stack slot used to save/restore it in the
- // prolog/epilog.
+ // If the VGPR is is used for SGPR spills in a non-entrypoint function, the
+ // stack slot used to save/restore it in the prolog/epilog.
Optional<int> FI;
- SGPRSpillVGPRCSR(Register V, Optional<int> F) : VGPR(V), FI(F) {}
+ SGPRSpillVGPR(Register V, Optional<int> F) : VGPR(V), FI(F) {}
};
struct VGPRSpillToAGPR {
// frameindex key.
DenseMap<int, std::vector<SpilledReg>> SGPRToVGPRSpills;
unsigned NumVGPRSpillLanes = 0;
- SmallVector<SGPRSpillVGPRCSR, 2> SpillVGPRs;
+ SmallVector<SGPRSpillVGPR, 2> SpillVGPRs;
DenseMap<int, VGPRSpillToAGPR> VGPRToAGPRSpills;
ArrayRef<SpilledReg>() : makeArrayRef(I->second);
}
- ArrayRef<SGPRSpillVGPRCSR> getSGPRSpillVGPRs() const {
- return SpillVGPRs;
- }
+ ArrayRef<SGPRSpillVGPR> getSGPRSpillVGPRs() const { return SpillVGPRs; }
void setSGPRSpillVGPRs(Register NewVGPR, Optional<int> newFI, int Index) {
SpillVGPRs[Index].VGPR = NewVGPR;