File tree Expand file tree Collapse file tree 1 file changed +5
-13
lines changed Expand file tree Collapse file tree 1 file changed +5
-13
lines changed Original file line number Diff line number Diff line change @@ -75,12 +75,9 @@ void R600InstrInfo::copyPhysReg(MachineBasicBlock &MBB,
75
75
// / \returns true if \p MBBI can be moved into a new basic.
76
76
bool R600InstrInfo::isLegalToSplitMBBAt (MachineBasicBlock &MBB,
77
77
MachineBasicBlock::iterator MBBI) const {
78
- for (MachineInstr::const_mop_iterator I = MBBI->operands_begin (),
79
- E = MBBI->operands_end (); I != E; ++I) {
80
- if (I->isReg () && !I->getReg ().isVirtual () && I->isUse () &&
81
- RI.isPhysRegLiveAcrossClauses (I->getReg ()))
78
+ for (const MachineOperand &MO : MBBI->all_uses ())
79
+ if (!MO.getReg ().isVirtual () && RI.isPhysRegLiveAcrossClauses (MO.getReg ()))
82
80
return false ;
83
- }
84
81
return true ;
85
82
}
86
83
@@ -219,15 +216,10 @@ bool R600InstrInfo::readsLDSSrcReg(const MachineInstr &MI) const {
219
216
if (!isALUInstr (MI.getOpcode ())) {
220
217
return false ;
221
218
}
222
- for (MachineInstr::const_mop_iterator I = MI.operands_begin (),
223
- E = MI.operands_end ();
224
- I != E; ++I) {
225
- if (!I->isReg () || !I->isUse () || I->getReg ().isVirtual ())
226
- continue ;
227
-
228
- if (R600::R600_LDS_SRC_REGRegClass.contains (I->getReg ()))
219
+ for (const MachineOperand &MO : MI.all_uses ())
220
+ if (MO.getReg ().isPhysical () &&
221
+ R600::R600_LDS_SRC_REGRegClass.contains (MO.getReg ()))
229
222
return true ;
230
- }
231
223
return false ;
232
224
}
233
225
You can’t perform that action at this time.
0 commit comments