[llvm] 1d99c3d - [Attributor] We (should) keep the CG updated so we can mark it as preserved

Johannes Doerfert via llvm-commits llvm-commits at lists.llvm.org
Mon Aug 17 21:39:32 PDT 2020


Author: Johannes Doerfert
Date: 2020-08-17T23:36:36-05:00
New Revision: 1d99c3d7073888517e3557c1b522ed273bbe188c

URL: https://github.com/llvm/llvm-project/commit/1d99c3d7073888517e3557c1b522ed273bbe188c
DIFF: https://github.com/llvm/llvm-project/commit/1d99c3d7073888517e3557c1b522ed273bbe188c.diff

LOG: [Attributor] We (should) keep the CG updated so we can mark it as preserved

Added: 
    

Modified: 
    llvm/lib/Transforms/IPO/Attributor.cpp

Removed: 
    


################################################################################
diff  --git a/llvm/lib/Transforms/IPO/Attributor.cpp b/llvm/lib/Transforms/IPO/Attributor.cpp
index fb217cb5f14e..54ec7174f9fb 100644
--- a/llvm/lib/Transforms/IPO/Attributor.cpp
+++ b/llvm/lib/Transforms/IPO/Attributor.cpp
@@ -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();
 }


        


More information about the llvm-commits mailing list