Use MachineInstr::mop_iterator instead of MIOperands; NFC
(Const)?MIOperands is equivalent to the C++ style
MachineInstr::mop_iterator. Use the latter for consistency except for a
few callers of MIOperands::analyzePhysReg().
llvm-svn: 285029
diff --git a/llvm/lib/Target/Hexagon/HexagonGenMux.cpp b/llvm/lib/Target/Hexagon/HexagonGenMux.cpp
index a0f1c7e..c780db8 100644
--- a/llvm/lib/Target/Hexagon/HexagonGenMux.cpp
+++ b/llvm/lib/Target/Hexagon/HexagonGenMux.cpp
@@ -132,11 +132,11 @@
expandReg(*R++, Uses);
// Look over all operands, and collect explicit defs and uses.
- for (ConstMIOperands Mo(*MI); Mo.isValid(); ++Mo) {
- if (!Mo->isReg() || Mo->isImplicit())
+ for (const MachineOperand &MO : MI->operands()) {
+ if (!MO.isReg() || MO.isImplicit())
continue;
- unsigned R = Mo->getReg();
- BitVector &Set = Mo->isDef() ? Defs : Uses;
+ unsigned R = MO.getReg();
+ BitVector &Set = MO.isDef() ? Defs : Uses;
expandReg(R, Set);
}
}