[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 01:46:19 PDT 2024


================
@@ -2357,41 +2323,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.uses()) {
----------------
jayfoad wrote:

Looks like the old code also handled implicit uses, so this should be `MI.all_uses()`?

https://github.com/llvm/llvm-project/pull/108884


More information about the llvm-commits mailing list