[PATCH] D28627: [PM] Introduce an analysis set used to preserve all analyses over a function's CFG when that CFG is unchanged.

Davide Italiano via Phabricator via llvm-commits llvm-commits at lists.llvm.org
Thu Jan 12 21:56:22 PST 2017


davide added inline comments.


================
Comment at: lib/Analysis/BlockFrequencyInfo.cpp:135-143
+bool BlockFrequencyInfo::invalidate(Function &F, const PreservedAnalyses &PA,
+                                    FunctionAnalysisManager::Invalidator &) {
+  // Check whether the analysis, all analyses on functions, or the function's
+  // CFG have been preserved.
+  auto PAC = PA.getChecker<BlockFrequencyAnalysis>();
+  return !(PAC.preserved() || PAC.preservedSet<AllAnalysesOn<Function>>() ||
+           PAC.preservedSet<AnalysesOnFunctionCFG>());
----------------
The class of `invalidate` functions share a decent amount of code, maybe we can factor it out somehow?


https://reviews.llvm.org/D28627





More information about the llvm-commits mailing list