1
0
mirror of https://github.com/RPCS3/llvm-mirror.git synced 2024-10-20 03:23:01 +02:00

[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 d85c4432d7
commit b55b757c5a

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