[llvm] [AMDGPU] Use range-based for loops (NFC) (PR #106328)
Matt Arsenault via llvm-commits
llvm-commits at lists.llvm.org
Tue Aug 27 19:52:57 PDT 2024
================
@@ -219,15 +216,10 @@ bool R600InstrInfo::readsLDSSrcReg(const MachineInstr &MI) const {
if (!isALUInstr(MI.getOpcode())) {
return false;
}
- for (MachineInstr::const_mop_iterator I = MI.operands_begin(),
- E = MI.operands_end();
- I != E; ++I) {
- if (!I->isReg() || !I->isUse() || I->getReg().isVirtual())
- continue;
-
- if (R600::R600_LDS_SRC_REGRegClass.contains(I->getReg()))
+ for (const MachineOperand &MO : MI.all_uses())
+ if (!MO.getReg().isVirtual() &&
----------------
arsenm wrote:
Would be slightly better if this was an isPhysical check instead of !isVirtual
https://github.com/llvm/llvm-project/pull/106328
More information about the llvm-commits
mailing list