forked from OSchip/llvm-project
[mips] Use range-based for loops and simplify slightly the code. NFC.
llvm-svn: 266471
This commit is contained in:
parent
0a91cf8a84
commit
36311395ae
|
@ -220,15 +220,19 @@ void MipsSEDAGToDAGISel::processFunctionAfterISel(MachineFunction &MF) {
|
||||||
|
|
||||||
MachineRegisterInfo *MRI = &MF.getRegInfo();
|
MachineRegisterInfo *MRI = &MF.getRegInfo();
|
||||||
|
|
||||||
for (MachineFunction::iterator MFI = MF.begin(), MFE = MF.end(); MFI != MFE;
|
for (auto &MBB: MF) {
|
||||||
++MFI)
|
for (auto &MI: MBB) {
|
||||||
for (MachineBasicBlock::iterator I = MFI->begin(); I != MFI->end(); ++I) {
|
switch (MI.getOpcode()) {
|
||||||
if (I->getOpcode() == Mips::RDDSP)
|
case Mips::RDDSP:
|
||||||
addDSPCtrlRegOperands(false, *I, MF);
|
addDSPCtrlRegOperands(false, MI, MF);
|
||||||
else if (I->getOpcode() == Mips::WRDSP)
|
break;
|
||||||
addDSPCtrlRegOperands(true, *I, MF);
|
case Mips::WRDSP:
|
||||||
else
|
addDSPCtrlRegOperands(true, MI, MF);
|
||||||
replaceUsesWithZeroReg(MRI, *I);
|
break;
|
||||||
|
default:
|
||||||
|
replaceUsesWithZeroReg(MRI, MI);
|
||||||
|
}
|
||||||
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
Loading…
Reference in New Issue