[Attributor] We (should) keep the CG updated so we can mark it as preserved
authorJohannes Doerfert <johannes@jdoerfert.de>
Sun, 2 Aug 2020 05:31:30 +0000 (00:31 -0500)
committerJohannes Doerfert <johannes@jdoerfert.de>
Tue, 18 Aug 2020 04:36:36 +0000 (23:36 -0500)
llvm/lib/Transforms/IPO/Attributor.cpp

index fb217cb..54ec717 100644 (file)
@@ -2324,7 +2324,9 @@ PreservedAnalyses AttributorCGSCCPass::run(LazyCallGraph::SCC &C,
   InformationCache InfoCache(M, AG, Allocator, /* CGSCC */ &Functions);
   if (runAttributorOnFunctions(InfoCache, Functions, AG, CGUpdater)) {
     // FIXME: Think about passes we will preserve and add them here.
-    return PreservedAnalyses::none();
+    PreservedAnalyses PA;
+    PA.preserve<FunctionAnalysisManagerCGSCCProxy>();
+    return PA;
   }
   return PreservedAnalyses::all();
 }