[PATCH] D80707: [legacyPM] Do not compute preserved analysis if there's no local change

serge via Phabricator via llvm-commits llvm-commits at lists.llvm.org
Mon Aug 24 01:35:26 PDT 2020


serge-sans-paille added inline comments.


================
Comment at: llvm/lib/IR/LegacyPassManager.cpp:1506-1507
     verifyPreservedAnalysis(FP);
-    removeNotPreservedAnalysis(FP);
+    if (LocalChanged)
+      removeNotPreservedAnalysis(FP);
     recordAvailableAnalysis(FP);
----------------
foad wrote:
> serge-sans-paille wrote:
> > foad wrote:
> > > Do the same for LoopPass, RegionPass and CallGraphSCCPass?
> > AFAIU, these three passes are all handled by the FunctionPassmanager, so there shouldn't be anything to do.
> LPPassManager::runOnFunction, RGPassManager::runOnFunction and CGPassManager::RunAllPassesOnSCC all call removeNotPreservedAnalysis unconditionally.
Correct! I'll open a review for that. Thanks o/


Repository:
  rG LLVM Github Monorepo

CHANGES SINCE LAST ACTION
  https://reviews.llvm.org/D80707/new/

https://reviews.llvm.org/D80707



More information about the llvm-commits mailing list