@@ -845,13 +845,13 @@ static void getCopyToPartsVector(SelectionDAG &DAG, const SDLoc &DL,
845
845
}
846
846
}
847
847
848
- RegsForValue::RegsForValue (const SmallVector<unsigned , 4 > ®s, MVT regvt,
848
+ RegsForValue::RegsForValue (const SmallVector<Register , 4 > ®s, MVT regvt,
849
849
EVT valuevt, std::optional<CallingConv::ID> CC)
850
850
: ValueVTs(1 , valuevt), RegVTs(1 , regvt), Regs(regs),
851
851
RegCount(1 , regs.size()), CallConv(CC) {}
852
852
853
853
RegsForValue::RegsForValue (LLVMContext &Context, const TargetLowering &TLI,
854
- const DataLayout &DL, unsigned Reg, Type *Ty,
854
+ const DataLayout &DL, Register Reg, Type *Ty,
855
855
std::optional<CallingConv::ID> CC) {
856
856
ComputeValueVTs (TLI, DL, Ty, ValueVTs);
857
857
@@ -870,7 +870,7 @@ RegsForValue::RegsForValue(LLVMContext &Context, const TargetLowering &TLI,
870
870
Regs.push_back (Reg + i);
871
871
RegVTs.push_back (RegisterVT);
872
872
RegCount.push_back (NumRegs);
873
- Reg += NumRegs;
873
+ Reg = Reg. id () + NumRegs;
874
874
}
875
875
}
876
876
@@ -1070,9 +1070,9 @@ void RegsForValue::AddInlineAsmOperands(InlineAsm::Kind Code, bool HasMatching,
1070
1070
}
1071
1071
}
1072
1072
1073
- SmallVector<std::pair<unsigned , TypeSize>, 4 >
1073
+ SmallVector<std::pair<Register , TypeSize>, 4 >
1074
1074
RegsForValue::getRegsAndSizes () const {
1075
- SmallVector<std::pair<unsigned , TypeSize>, 4 > OutVec;
1075
+ SmallVector<std::pair<Register , TypeSize>, 4 > OutVec;
1076
1076
unsigned I = 0 ;
1077
1077
for (auto CountAndVT : zip_first (RegCount, RegVTs)) {
1078
1078
unsigned RegCount = std::get<0 >(CountAndVT);
@@ -5956,7 +5956,7 @@ static SDValue expandDivFix(unsigned Opcode, const SDLoc &DL,
5956
5956
// getUnderlyingArgRegs - Find underlying registers used for a truncated,
5957
5957
// bitcasted, or split argument. Returns a list of <Register, size in bits>
5958
5958
static void
5959
- getUnderlyingArgRegs (SmallVectorImpl<std::pair<unsigned , TypeSize>> &Regs,
5959
+ getUnderlyingArgRegs (SmallVectorImpl<std::pair<Register , TypeSize>> &Regs,
5960
5960
const SDValue &N) {
5961
5961
switch (N.getOpcode ()) {
5962
5962
case ISD::CopyFromReg: {
@@ -6101,7 +6101,7 @@ bool SelectionDAGBuilder::EmitFuncArgumentDbgValue(
6101
6101
if (FI != std::numeric_limits<int >::max ())
6102
6102
Op = MachineOperand::CreateFI (FI);
6103
6103
6104
- SmallVector<std::pair<unsigned , TypeSize>, 8 > ArgRegsAndSizes;
6104
+ SmallVector<std::pair<Register , TypeSize>, 8 > ArgRegsAndSizes;
6105
6105
if (!Op && N.getNode ()) {
6106
6106
getUnderlyingArgRegs (ArgRegsAndSizes, N);
6107
6107
Register Reg;
@@ -6131,7 +6131,7 @@ bool SelectionDAGBuilder::EmitFuncArgumentDbgValue(
6131
6131
6132
6132
if (!Op) {
6133
6133
// Create a DBG_VALUE for each decomposed value in ArgRegs to cover Reg
6134
- auto splitMultiRegDbgValue = [&](ArrayRef<std::pair<unsigned , TypeSize>>
6134
+ auto splitMultiRegDbgValue = [&](ArrayRef<std::pair<Register , TypeSize>>
6135
6135
SplitRegs) {
6136
6136
unsigned Offset = 0 ;
6137
6137
for (const auto &RegAndSize : SplitRegs) {
@@ -9653,7 +9653,7 @@ getRegistersForValue(SelectionDAG &DAG, const SDLoc &DL,
9653
9653
const TargetLowering &TLI = DAG.getTargetLoweringInfo ();
9654
9654
9655
9655
MachineFunction &MF = DAG.getMachineFunction ();
9656
- SmallVector<unsigned , 4 > Regs;
9656
+ SmallVector<Register , 4 > Regs;
9657
9657
const TargetRegisterInfo &TRI = *MF.getSubtarget ().getRegisterInfo ();
9658
9658
9659
9659
// No work to do for memory/address operands.
@@ -10078,7 +10078,7 @@ void SelectionDAGBuilder::visitInlineAsm(const CallBase &Call,
10078
10078
return ;
10079
10079
}
10080
10080
10081
- SmallVector<unsigned , 4 > Regs;
10081
+ SmallVector<Register , 4 > Regs;
10082
10082
MachineFunction &MF = DAG.getMachineFunction ();
10083
10083
MachineRegisterInfo &MRI = MF.getRegInfo ();
10084
10084
const TargetRegisterInfo &TRI = *MF.getSubtarget ().getRegisterInfo ();
@@ -12654,7 +12654,7 @@ void SelectionDAGBuilder::visitCallBrLandingPad(const CallInst &I) {
12654
12654
12655
12655
// getRegistersForValue may produce 1 to many registers based on whether
12656
12656
// the OpInfo.ConstraintVT is legal on the target or not.
12657
- for (unsigned &Reg : OpInfo.AssignedRegs .Regs ) {
12657
+ for (Register &Reg : OpInfo.AssignedRegs .Regs ) {
12658
12658
Register OriginalDef = FollowCopyChain (MRI, InitialDef++);
12659
12659
if (Register::isPhysicalRegister (OriginalDef))
12660
12660
FuncInfo.MBB ->addLiveIn (OriginalDef);
0 commit comments