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,16 +220,20 @@ void MipsSEDAGToDAGISel::processFunctionAfterISel(MachineFunction &MF) {
|
|||
|
||||
MachineRegisterInfo *MRI = &MF.getRegInfo();
|
||||
|
||||
for (MachineFunction::iterator MFI = MF.begin(), MFE = MF.end(); MFI != MFE;
|
||||
++MFI)
|
||||
for (MachineBasicBlock::iterator I = MFI->begin(); I != MFI->end(); ++I) {
|
||||
if (I->getOpcode() == Mips::RDDSP)
|
||||
addDSPCtrlRegOperands(false, *I, MF);
|
||||
else if (I->getOpcode() == Mips::WRDSP)
|
||||
addDSPCtrlRegOperands(true, *I, MF);
|
||||
else
|
||||
replaceUsesWithZeroReg(MRI, *I);
|
||||
for (auto &MBB: MF) {
|
||||
for (auto &MI: MBB) {
|
||||
switch (MI.getOpcode()) {
|
||||
case Mips::RDDSP:
|
||||
addDSPCtrlRegOperands(false, MI, MF);
|
||||
break;
|
||||
case Mips::WRDSP:
|
||||
addDSPCtrlRegOperands(true, MI, MF);
|
||||
break;
|
||||
default:
|
||||
replaceUsesWithZeroReg(MRI, MI);
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
SDNode *MipsSEDAGToDAGISel::selectAddESubE(unsigned MOp, SDValue InFlag,
|
||||
|
|
Loading…
Reference in New Issue