[llvm] [AMDGPU] Refine operand iterators in the SIInsertWaitcnts. NFCI. (PR #108884)
    Jay Foad via llvm-commits 
    llvm-commits at lists.llvm.org
       
    Tue Sep 17 02:07:32 PDT 2024
    
    
  
================
@@ -2357,41 +2326,43 @@ bool SIInsertWaitcnts::shouldFlushVmCnt(MachineLoop *ML,
         if (MI.mayStore())
           HasVMemStore = true;
       }
-      for (unsigned I = 0; I < MI.getNumOperands(); I++) {
-        MachineOperand &Op = MI.getOperand(I);
+      for (const MachineOperand &Op : MI.all_uses()) {
         if (!Op.isReg() || !TRI->isVectorRegister(*MRI, Op.getReg()))
----------------
jayfoad wrote:
Nit: don't need the isReg check.
https://github.com/llvm/llvm-project/pull/108884
    
    
More information about the llvm-commits
mailing list