[llvm] [AMDGPU] Cgscc amdgpu attributor (PR #179719)

Yoonseo Choi via llvm-commits llvm-commits at lists.llvm.org
Wed Feb 4 10:47:10 PST 2026


================
@@ -1681,7 +1667,50 @@ PreservedAnalyses llvm::AMDGPUAttributorPass::run(Module &M,
       AM.getResult<FunctionAnalysisManagerModuleProxy>(M).getManager();
   AnalysisGetter AG(FAM);
 
+  SetVector<Function *> Functions;
+  for (Function &F : M) {
+    if (!F.isIntrinsic())
+      Functions.insert(&F);
+  }
+
+  if (Functions.empty())
+    return PreservedAnalyses::all();
+
   // TODO: Probably preserves CFG
-  return runImpl(M, AG, TM, Options, LTOPhase) ? PreservedAnalyses::none()
-                                               : PreservedAnalyses::all();
+  return runImpl(Functions, true /*IsModulePass*/, M, AG, TM, Options, LTOPhase)
+             ? PreservedAnalyses::none()
----------------
yoonseoch wrote:

`Functions` contains all functions in Module. IsModulePass is set to true, which will be used for AttributorConfig. 

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


More information about the llvm-commits mailing list