[llvm] [AMDGPU][NPM] Preserve analyses in AMDGPURewriteAGPRCopyMFMA for NPM (PR #170130)

Prasoon Mishra via llvm-commits llvm-commits at lists.llvm.org
Mon Dec 1 09:07:16 PST 2025


================
@@ -659,7 +660,11 @@ AMDGPURewriteAGPRCopyMFMAPass::run(MachineFunction &MF,
   if (!Impl.run(MF))
     return PreservedAnalyses::all();
   auto PA = getMachineFunctionPassPreservedAnalyses();
-  PA.preserveSet<CFGAnalyses>();
-  PA.preserve<LiveStacksAnalysis>();
+  PA.preserveSet<CFGAnalyses>()
+      .preserve<LiveStacksAnalysis>()
+      .preserve<VirtRegMapAnalysis>()
+      .preserve<SlotIndexesAnalysis>()
----------------
PrasoonMishra wrote:

Thanks for pointing that out. I agree the current approach isn’t ideal, but given the limitations of the pass manager right now, I’ll leave it as is.

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


More information about the llvm-commits mailing list