Skip to content

Commit 11c2240

Browse files
committed
[SDAGBuilder] Rename RetTys -> RetVTs (NFC)
Make it clearer that this is a vector of EVTs, not IR types. Based on: #153798 (comment)
1 parent 6069374 commit 11c2240

File tree

1 file changed

+15
-15
lines changed

1 file changed

+15
-15
lines changed

llvm/lib/CodeGen/SelectionDAG/SelectionDAGBuilder.cpp

Lines changed: 15 additions & 15 deletions
Original file line numberDiff line numberDiff line change
@@ -11016,27 +11016,27 @@ TargetLowering::LowerCallTo(TargetLowering::CallLoweringInfo &CLI) const {
1101611016
auto &DL = CLI.DAG.getDataLayout();
1101711017
ComputeValueTypes(DL, CLI.RetTy, RetOrigTys, &Offsets);
1101811018

11019-
SmallVector<EVT, 4> RetTys;
11019+
SmallVector<EVT, 4> RetVTs;
1102011020
for (Type *Ty : RetOrigTys)
11021-
RetTys.push_back(getValueType(DL, Ty));
11021+
RetVTs.push_back(getValueType(DL, Ty));
1102211022

1102311023
if (CLI.IsPostTypeLegalization) {
1102411024
// If we are lowering a libcall after legalization, split the return type.
1102511025
SmallVector<Type *, 4> OldRetOrigTys;
11026-
SmallVector<EVT, 4> OldRetTys;
11026+
SmallVector<EVT, 4> OldRetVTs;
1102711027
SmallVector<TypeSize, 4> OldOffsets;
1102811028
RetOrigTys.swap(OldRetOrigTys);
11029-
RetTys.swap(OldRetTys);
11029+
RetVTs.swap(OldRetVTs);
1103011030
Offsets.swap(OldOffsets);
1103111031

11032-
for (size_t i = 0, e = OldRetTys.size(); i != e; ++i) {
11033-
EVT RetVT = OldRetTys[i];
11032+
for (size_t i = 0, e = OldRetVTs.size(); i != e; ++i) {
11033+
EVT RetVT = OldRetVTs[i];
1103411034
uint64_t Offset = OldOffsets[i];
1103511035
MVT RegisterVT = getRegisterType(Context, RetVT);
1103611036
unsigned NumRegs = getNumRegisters(Context, RetVT);
1103711037
unsigned RegisterVTByteSZ = RegisterVT.getSizeInBits() / 8;
1103811038
RetOrigTys.append(NumRegs, OldRetOrigTys[i]);
11039-
RetTys.append(NumRegs, RegisterVT);
11039+
RetVTs.append(NumRegs, RegisterVT);
1104011040
for (unsigned j = 0; j != NumRegs; ++j)
1104111041
Offsets.push_back(TypeSize::getFixed(Offset + j * RegisterVTByteSZ));
1104211042
}
@@ -11090,14 +11090,14 @@ TargetLowering::LowerCallTo(TargetLowering::CallLoweringInfo &CLI) const {
1109011090
} else {
1109111091
bool NeedsRegBlock = functionArgumentNeedsConsecutiveRegisters(
1109211092
CLI.RetTy, CLI.CallConv, CLI.IsVarArg, DL);
11093-
for (unsigned I = 0, E = RetTys.size(); I != E; ++I) {
11093+
for (unsigned I = 0, E = RetVTs.size(); I != E; ++I) {
1109411094
ISD::ArgFlagsTy Flags;
1109511095
if (NeedsRegBlock) {
1109611096
Flags.setInConsecutiveRegs();
11097-
if (I == RetTys.size() - 1)
11097+
if (I == RetVTs.size() - 1)
1109811098
Flags.setInConsecutiveRegsLast();
1109911099
}
11100-
EVT VT = RetTys[I];
11100+
EVT VT = RetVTs[I];
1110111101
MVT RegisterVT = getRegisterTypeForCallingConv(Context, CLI.CallConv, VT);
1110211102
unsigned NumRegs =
1110311103
getNumRegistersForCallingConv(Context, CLI.CallConv, VT);
@@ -11258,7 +11258,7 @@ TargetLowering::LowerCallTo(TargetLowering::CallLoweringInfo &CLI) const {
1125811258
(CLI.RetTy->isPointerTy() && Args[i].Ty->isPointerTy() &&
1125911259
CLI.RetTy->getPointerAddressSpace() ==
1126011260
Args[i].Ty->getPointerAddressSpace())) &&
11261-
RetTys.size() == NumValues && "unexpected use of 'returned'");
11261+
RetVTs.size() == NumValues && "unexpected use of 'returned'");
1126211262
// Before passing 'returned' to the target lowering code, ensure that
1126311263
// either the register MVT and the actual EVT are the same size or that
1126411264
// the return value and argument are extended in the same way; in these
@@ -11339,7 +11339,7 @@ TargetLowering::LowerCallTo(TargetLowering::CallLoweringInfo &CLI) const {
1133911339
// hidden sret parameter.
1134011340
MVT PtrVT = getPointerTy(DL, DL.getAllocaAddrSpace());
1134111341

11342-
unsigned NumValues = RetTys.size();
11342+
unsigned NumValues = RetVTs.size();
1134311343
ReturnValues.resize(NumValues);
1134411344
SmallVector<SDValue, 4> Chains(NumValues);
1134511345

@@ -11352,7 +11352,7 @@ TargetLowering::LowerCallTo(TargetLowering::CallLoweringInfo &CLI) const {
1135211352
DemoteStackSlot, CLI.DAG.getConstant(Offsets[i], CLI.DL, PtrVT),
1135311353
CLI.DL, SDNodeFlags::NoUnsignedWrap);
1135411354
SDValue L = CLI.DAG.getLoad(
11355-
RetTys[i], CLI.DL, CLI.Chain, Add,
11355+
RetVTs[i], CLI.DL, CLI.Chain, Add,
1135611356
MachinePointerInfo::getFixedStack(CLI.DAG.getMachineFunction(),
1135711357
DemoteStackIdx, Offsets[i]),
1135811358
HiddenSRetAlign);
@@ -11370,7 +11370,7 @@ TargetLowering::LowerCallTo(TargetLowering::CallLoweringInfo &CLI) const {
1137011370
else if (CLI.RetZExt)
1137111371
AssertOp = ISD::AssertZext;
1137211372
unsigned CurReg = 0;
11373-
for (EVT VT : RetTys) {
11373+
for (EVT VT : RetVTs) {
1137411374
MVT RegisterVT = getRegisterTypeForCallingConv(Context, CLI.CallConv, VT);
1137511375
unsigned NumRegs =
1137611376
getNumRegistersForCallingConv(Context, CLI.CallConv, VT);
@@ -11389,7 +11389,7 @@ TargetLowering::LowerCallTo(TargetLowering::CallLoweringInfo &CLI) const {
1138911389
}
1139011390

1139111391
SDValue Res = CLI.DAG.getNode(ISD::MERGE_VALUES, CLI.DL,
11392-
CLI.DAG.getVTList(RetTys), ReturnValues);
11392+
CLI.DAG.getVTList(RetVTs), ReturnValues);
1139311393
return std::make_pair(Res, CLI.Chain);
1139411394
}
1139511395

0 commit comments

Comments
 (0)