[llvm] [AMDGPU] Register allocation anti-hints to reduce MFMA hazard NOPs (PR #156943)

Diana Picus via llvm-commits llvm-commits at lists.llvm.org
Mon Oct 6 03:36:31 PDT 2025


================
@@ -248,6 +254,95 @@ bool GCNPreRAOptimizationsImpl::run(MachineFunction &MF) {
 
   bool Changed = false;
 
+  // Single pass implementation
+  if (EnableAntiHintsForMFMARegs && ST.hasMAIInsts()) {
+    // Max lookback window for RAW or WAW hazard
+    constexpr unsigned MaxLookbackWindow = 19;
+    for (const MachineBasicBlock &MBB : MF) {
+
----------------
rovka wrote:

```suggestion
```

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


More information about the llvm-commits mailing list