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

Jay Foad via Phabricator via llvm-commits llvm-commits at lists.llvm.org
Tue Aug 4 08:24:37 PDT 2020


foad added inline comments.


================
Comment at: llvm/lib/IR/LegacyPassManager.cpp:1506-1507
     verifyPreservedAnalysis(FP);
-    removeNotPreservedAnalysis(FP);
+    if (LocalChanged)
+      removeNotPreservedAnalysis(FP);
     recordAvailableAnalysis(FP);
----------------
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.


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