[llvm] r361964 - [mips] Use range-based for loops. NFC
Simon Atanasyan via llvm-commits
llvm-commits at lists.llvm.org
Wed May 29 07:58:50 PDT 2019
Author: atanasyan
Date: Wed May 29 07:58:50 2019
New Revision: 361964
URL: http://llvm.org/viewvc/llvm-project?rev=361964&view=rev
Log:
[mips] Use range-based for loops. NFC
Modified:
llvm/trunk/lib/Target/Mips/MipsRegisterInfo.cpp
Modified: llvm/trunk/lib/Target/Mips/MipsRegisterInfo.cpp
URL: http://llvm.org/viewvc/llvm-project/llvm/trunk/lib/Target/Mips/MipsRegisterInfo.cpp?rev=361964&r1=361963&r2=361964&view=diff
==============================================================================
--- llvm/trunk/lib/Target/Mips/MipsRegisterInfo.cpp (original)
+++ llvm/trunk/lib/Target/Mips/MipsRegisterInfo.cpp Wed May 29 07:58:50 2019
@@ -159,8 +159,6 @@ getReservedRegs(const MachineFunction &M
BitVector Reserved(getNumRegs());
const MipsSubtarget &Subtarget = MF.getSubtarget<MipsSubtarget>();
- using RegIter = TargetRegisterClass::const_iterator;
-
for (unsigned I = 0; I < array_lengthof(ReservedGPR32); ++I)
Reserved.set(ReservedGPR32[I]);
@@ -182,14 +180,12 @@ getReservedRegs(const MachineFunction &M
if (Subtarget.isFP64bit()) {
// Reserve all registers in AFGR64.
- for (RegIter Reg = Mips::AFGR64RegClass.begin(),
- EReg = Mips::AFGR64RegClass.end(); Reg != EReg; ++Reg)
- Reserved.set(*Reg);
+ for (MCPhysReg Reg : Mips::AFGR64RegClass)
+ Reserved.set(Reg);
} else {
// Reserve all registers in FGR64.
- for (RegIter Reg = Mips::FGR64RegClass.begin(),
- EReg = Mips::FGR64RegClass.end(); Reg != EReg; ++Reg)
- Reserved.set(*Reg);
+ for (MCPhysReg Reg : Mips::FGR64RegClass)
+ Reserved.set(Reg);
}
// Reserve FP if this function should have a dedicated frame pointer register.
if (Subtarget.getFrameLowering()->hasFP(MF)) {
More information about the llvm-commits
mailing list