From d13daa4018faf6a3427d80ed17e10f5913fee1b5 Mon Sep 17 00:00:00 2001 From: Johannes Doerfert Date: Sat, 10 Oct 2020 09:59:09 -0500 Subject: [PATCH] [Attributor] Finalize the CGUpdater after each SCC This matches the new PM model. --- llvm/lib/Transforms/IPO/Attributor.cpp | 4 +--- 1 file changed, 1 insertion(+), 3 deletions(-) diff --git a/llvm/lib/Transforms/IPO/Attributor.cpp b/llvm/lib/Transforms/IPO/Attributor.cpp index 81430f1..55eb42e 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(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(); -- 2.7.4