Skip to content

Commit 13d09df

Browse files
authored
[X86] Simplify ArrayRef construction. NFC (#123899)
I think the std::begin/end were to work around an old gcc bug. Hopefully we don't need them anymore.
1 parent fa6f88a commit 13d09df

File tree

2 files changed

+7
-7
lines changed

2 files changed

+7
-7
lines changed

llvm/lib/Target/X86/X86CallingConv.cpp

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -68,23 +68,23 @@ static ArrayRef<MCPhysReg> CC_X86_VectorCallGetSSEs(const MVT &ValVT) {
6868
if (ValVT.is512BitVector()) {
6969
static const MCPhysReg RegListZMM[] = {X86::ZMM0, X86::ZMM1, X86::ZMM2,
7070
X86::ZMM3, X86::ZMM4, X86::ZMM5};
71-
return ArrayRef(std::begin(RegListZMM), std::end(RegListZMM));
71+
return RegListZMM;
7272
}
7373

7474
if (ValVT.is256BitVector()) {
7575
static const MCPhysReg RegListYMM[] = {X86::YMM0, X86::YMM1, X86::YMM2,
7676
X86::YMM3, X86::YMM4, X86::YMM5};
77-
return ArrayRef(std::begin(RegListYMM), std::end(RegListYMM));
77+
return RegListYMM;
7878
}
7979

8080
static const MCPhysReg RegListXMM[] = {X86::XMM0, X86::XMM1, X86::XMM2,
8181
X86::XMM3, X86::XMM4, X86::XMM5};
82-
return ArrayRef(std::begin(RegListXMM), std::end(RegListXMM));
82+
return RegListXMM;
8383
}
8484

8585
static ArrayRef<MCPhysReg> CC_X86_64_VectorCallGetGPRs() {
8686
static const MCPhysReg RegListGPR[] = {X86::RCX, X86::RDX, X86::R8, X86::R9};
87-
return ArrayRef(std::begin(RegListGPR), std::end(RegListGPR));
87+
return RegListGPR;
8888
}
8989

9090
static bool CC_X86_VectorCallAssignRegister(unsigned &ValNo, MVT &ValVT,

llvm/lib/Target/X86/X86ISelLoweringCall.cpp

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1416,13 +1416,13 @@ static ArrayRef<MCPhysReg> get64BitArgumentGPRs(CallingConv::ID CallConv,
14161416
static const MCPhysReg GPR64ArgRegsWin64[] = {
14171417
X86::RCX, X86::RDX, X86::R8, X86::R9
14181418
};
1419-
return ArrayRef(std::begin(GPR64ArgRegsWin64), std::end(GPR64ArgRegsWin64));
1419+
return GPR64ArgRegsWin64;
14201420
}
14211421

14221422
static const MCPhysReg GPR64ArgRegs64Bit[] = {
14231423
X86::RDI, X86::RSI, X86::RDX, X86::RCX, X86::R8, X86::R9
14241424
};
1425-
return ArrayRef(std::begin(GPR64ArgRegs64Bit), std::end(GPR64ArgRegs64Bit));
1425+
return GPR64ArgRegs64Bit;
14261426
}
14271427

14281428
// FIXME: Get this from tablegen.
@@ -1448,7 +1448,7 @@ static ArrayRef<MCPhysReg> get64BitArgumentXMMs(MachineFunction &MF,
14481448
X86::XMM0, X86::XMM1, X86::XMM2, X86::XMM3,
14491449
X86::XMM4, X86::XMM5, X86::XMM6, X86::XMM7
14501450
};
1451-
return ArrayRef(std::begin(XMMArgRegs64Bit), std::end(XMMArgRegs64Bit));
1451+
return XMMArgRegs64Bit;
14521452
}
14531453

14541454
#ifndef NDEBUG

0 commit comments

Comments
 (0)