[llvm] d13daa4 - [Attributor] Finalize the CGUpdater after each SCC
Johannes Doerfert via llvm-commits
llvm-commits at lists.llvm.org
Tue Oct 27 20:08:50 PDT 2020
Author: Johannes Doerfert
Date: 2020-10-27T22:07:56-05:00
New Revision: d13daa4018faf6a3427d80ed17e10f5913fee1b5
URL: https://github.com/llvm/llvm-project/commit/d13daa4018faf6a3427d80ed17e10f5913fee1b5
DIFF: https://github.com/llvm/llvm-project/commit/d13daa4018faf6a3427d80ed17e10f5913fee1b5.diff
LOG: [Attributor] Finalize the CGUpdater after each SCC
This matches the new PM model.
Added:
Modified:
llvm/lib/Transforms/IPO/Attributor.cpp
Removed:
################################################################################
diff --git a/llvm/lib/Transforms/IPO/Attributor.cpp b/llvm/lib/Transforms/IPO/Attributor.cpp
index 81430f132fcf..55eb42ee46cd 100644
--- a/llvm/lib/Transforms/IPO/Attributor.cpp
+++ b/llvm/lib/Transforms/IPO/Attributor.cpp
@@ -2495,7 +2495,6 @@ struct AttributorLegacyPass : public ModulePass {
};
struct AttributorCGSCCLegacyPass : public CallGraphSCCPass {
- CallGraphUpdater CGUpdater;
static char ID;
AttributorCGSCCLegacyPass() : CallGraphSCCPass(ID) {
@@ -2517,6 +2516,7 @@ struct AttributorCGSCCLegacyPass : public CallGraphSCCPass {
AnalysisGetter AG;
CallGraph &CG = const_cast<CallGraph &>(SCC.getCallGraph());
+ CallGraphUpdater CGUpdater;
CGUpdater.initialize(CG, SCC);
Module &M = *Functions.back()->getParent();
BumpPtrAllocator Allocator;
@@ -2524,8 +2524,6 @@ struct AttributorCGSCCLegacyPass : public CallGraphSCCPass {
return runAttributorOnFunctions(InfoCache, Functions, AG, CGUpdater);
}
- bool doFinalization(CallGraph &CG) override { return CGUpdater.finalize(); }
-
void getAnalysisUsage(AnalysisUsage &AU) const override {
// FIXME: Think about passes we will preserve and add them here.
AU.addRequired<TargetLibraryInfoWrapperPass>();
More information about the llvm-commits
mailing list