forked from OSchip/llvm-project
[Attributor] Finalize the CGUpdater after each SCC
This matches the new PM model.
This commit is contained in:
parent
50d34958df
commit
d13daa4018
|
@ -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>();
|
||||
|
|
Loading…
Reference in New Issue