[llvm] [AMDGPU] Remove s_delay_alu for VALU->SGPR->SALU (PR #127212)
    Nicolai Hähnle via llvm-commits 
    llvm-commits at lists.llvm.org
       
    Tue Feb 25 10:37:24 PST 2025
    
    
  
================
@@ -236,6 +251,17 @@ class AMDGPUInsertDelayAlu : public MachineFunctionPass {
       }
     }
 
+    void advanceByNum(DelayType Type, unsigned Cycles,
+                      unsigned SGPRWriteVALUNum) {
+      iterator Next;
+      for (auto I = begin(), E = end(); I != E; I = Next) {
+        Next = std::next(I);
+        if (I->second.VALUNum >= SGPRWriteVALUNum && I->second.VALUCycles > 0) {
+          erase(I);
+        }
+      }
+    }
----------------
nhaehnle wrote:
Type and Cycles aren't actually used, which makes this method misleading.
You could rename it to `advanceByVALUNum` and only pass the last argument.
https://github.com/llvm/llvm-project/pull/127212
    
    
More information about the llvm-commits
mailing list