[Attributor] Finalize the CGUpdater after each SCC

This matches the new PM model.
This commit is contained in:
Johannes Doerfert 2020-10-10 09:59:09 -05:00
parent 50d34958df
commit d13daa4018
1 changed files with 1 additions and 3 deletions

View File

@ -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>();