[llvm] [NFC] ProfileSummaryInfo: use analysis manager mechanisms for invalidation (PR #86086)

via llvm-commits llvm-commits at lists.llvm.org
Thu Mar 21 14:35:34 PDT 2024


================
@@ -2157,10 +2159,16 @@ PreservedAnalyses PGOInstrumentationUse::run(Module &M,
     return &FAM.getResult<BlockFrequencyAnalysis>(F);
   };
 
-  auto *PSI = &MAM.getResult<ProfileSummaryAnalysis>(M);
+  auto AbandonAndRefreshPSI = [&MAM](Module &M) {
----------------
WenleiHe wrote:

why we do this through a lambda instead of just invalidate and get result for PSI right here? I think it's cleaner to just do it here and pass in PSI.. 

https://github.com/llvm/llvm-project/pull/86086


More information about the llvm-commits mailing list