[llvm] [AMDGPU] AMDGPULateCodeGenPrepare Legacy PM: replace `setPreservesAll()` with `setPreservesCFG()` (PR #148167)

Jim M. R. Teichgräber via llvm-commits llvm-commits at lists.llvm.org
Fri Jul 11 07:51:42 PDT 2025


================
@@ -546,7 +546,9 @@ class AMDGPULateCodeGenPrepareLegacy : public FunctionPass {
     AU.addRequired<TargetPassConfig>();
     AU.addRequired<AssumptionCacheTracker>();
     AU.addRequired<UniformityInfoWrapperPass>();
-    AU.setPreservesAll();
+    // This pass makes changes that can invalidate Uniformity Analysis,
+    // so don't setPreserveAll() here (see new PM version above).
+    AU.setPreservesCFG();
----------------
J-MR-T wrote:

(of course, the pass should most likely also blanket-invalidate analyses that it doesn't use, which might be reason enough to leave the comment out, if this is obvious for any future edits)

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


More information about the llvm-commits mailing list