[llvm] [Attributor][NFC] Drop unused arg `AG` from runAttributorOnFunctions (PR #209103)
Wenju He via llvm-commits
llvm-commits at lists.llvm.org
Mon Jul 13 02:20:05 PDT 2026
https://github.com/wenju-he updated https://github.com/llvm/llvm-project/pull/209103
>From 176284ac6f873881952c3294ddcac41788c9f6ad Mon Sep 17 00:00:00 2001
From: Wenju He <wenju.he at intel.com>
Date: Mon, 13 Jul 2026 09:55:41 +0200
Subject: [PATCH 1/2] [Attributor][NFC] Drop unused arg `AG` from
runAttributorOnFunctions
---
llvm/lib/Transforms/IPO/Attributor.cpp | 5 ++---
1 file changed, 2 insertions(+), 3 deletions(-)
diff --git a/llvm/lib/Transforms/IPO/Attributor.cpp b/llvm/lib/Transforms/IPO/Attributor.cpp
index 9001507b7c70f..d0f6cf7ae64e9 100644
--- a/llvm/lib/Transforms/IPO/Attributor.cpp
+++ b/llvm/lib/Transforms/IPO/Attributor.cpp
@@ -3868,7 +3868,6 @@ raw_ostream &llvm::operator<<(raw_ostream &OS,
static bool runAttributorOnFunctions(InformationCache &InfoCache,
SetVector<Function *> &Functions,
- AnalysisGetter &AG,
CallGraphUpdater &CGUpdater,
FunctionAnalysisManager &FAM,
bool DeleteFns, bool IsModulePass) {
@@ -4105,7 +4104,7 @@ PreservedAnalyses AttributorPass::run(Module &M, ModuleAnalysisManager &AM) {
CallGraphUpdater CGUpdater;
BumpPtrAllocator Allocator;
InformationCache InfoCache(M, AG, Allocator, /* CGSCC */ nullptr);
- if (runAttributorOnFunctions(InfoCache, Functions, AG, CGUpdater, FAM,
+ if (runAttributorOnFunctions(InfoCache, Functions, CGUpdater, FAM,
/* DeleteFns */ true, /* IsModulePass */ true)) {
// FIXME: Think about passes we will preserve and add them here.
return PreservedAnalyses::none();
@@ -4133,7 +4132,7 @@ PreservedAnalyses AttributorCGSCCPass::run(LazyCallGraph::SCC &C,
CGUpdater.initialize(CG, C, AM, UR);
BumpPtrAllocator Allocator;
InformationCache InfoCache(M, AG, Allocator, /* CGSCC */ &Functions);
- if (runAttributorOnFunctions(InfoCache, Functions, AG, CGUpdater, FAM,
+ if (runAttributorOnFunctions(InfoCache, Functions, CGUpdater, FAM,
/* DeleteFns */ false,
/* IsModulePass */ false)) {
// FIXME: Think about passes we will preserve and add them here.
>From fe462fffc5b604933cebc9b7b8a02ae295fdf8c6 Mon Sep 17 00:00:00 2001
From: Wenju He <wenju.he at intel.com>
Date: Mon, 13 Jul 2026 11:19:28 +0200
Subject: [PATCH 2/2] remove unused arg AG from runAttributorLightOnFunctions
---
llvm/lib/Transforms/IPO/Attributor.cpp | 5 ++---
1 file changed, 2 insertions(+), 3 deletions(-)
diff --git a/llvm/lib/Transforms/IPO/Attributor.cpp b/llvm/lib/Transforms/IPO/Attributor.cpp
index d0f6cf7ae64e9..3028ad1f1bea7 100644
--- a/llvm/lib/Transforms/IPO/Attributor.cpp
+++ b/llvm/lib/Transforms/IPO/Attributor.cpp
@@ -3979,7 +3979,6 @@ static bool runAttributorOnFunctions(InformationCache &InfoCache,
static bool runAttributorLightOnFunctions(InformationCache &InfoCache,
SetVector<Function *> &Functions,
- AnalysisGetter &AG,
CallGraphUpdater &CGUpdater,
FunctionAnalysisManager &FAM,
bool IsModulePass) {
@@ -4156,7 +4155,7 @@ PreservedAnalyses AttributorLightPass::run(Module &M,
CallGraphUpdater CGUpdater;
BumpPtrAllocator Allocator;
InformationCache InfoCache(M, AG, Allocator, /* CGSCC */ nullptr);
- if (runAttributorLightOnFunctions(InfoCache, Functions, AG, CGUpdater, FAM,
+ if (runAttributorLightOnFunctions(InfoCache, Functions, CGUpdater, FAM,
/* IsModulePass */ true)) {
PreservedAnalyses PA;
// We have not added or removed functions.
@@ -4188,7 +4187,7 @@ PreservedAnalyses AttributorLightCGSCCPass::run(LazyCallGraph::SCC &C,
CGUpdater.initialize(CG, C, AM, UR);
BumpPtrAllocator Allocator;
InformationCache InfoCache(M, AG, Allocator, /* CGSCC */ &Functions);
- if (runAttributorLightOnFunctions(InfoCache, Functions, AG, CGUpdater, FAM,
+ if (runAttributorLightOnFunctions(InfoCache, Functions, CGUpdater, FAM,
/* IsModulePass */ false)) {
PreservedAnalyses PA;
// We have not added or removed functions.
More information about the llvm-commits
mailing list