[PATCH] D72817: [LazyCallGraph] Add invalidate method.
Alina Sbirlea via Phabricator via llvm-commits
llvm-commits at lists.llvm.org
Fri Jan 17 10:52:19 PST 2020
This revision was not accepted when it landed; it landed in state "Needs Review".
This revision was automatically updated to reflect the committed changes.
Closed by commit rG78d4096d037e: [LazyCallGraph] Add invalidate method. (authored by asbirlea).
Changed prior to commit:
https://reviews.llvm.org/D72817?vs=238399&id=238830#toc
Repository:
rG LLVM Github Monorepo
CHANGES SINCE LAST ACTION
https://reviews.llvm.org/D72817/new/
https://reviews.llvm.org/D72817
Files:
llvm/include/llvm/Analysis/LazyCallGraph.h
llvm/lib/Analysis/LazyCallGraph.cpp
Index: llvm/lib/Analysis/LazyCallGraph.cpp
===================================================================
--- llvm/lib/Analysis/LazyCallGraph.cpp
+++ llvm/lib/Analysis/LazyCallGraph.cpp
@@ -215,6 +215,15 @@
updateGraphPtrs();
}
+bool LazyCallGraph::invalidate(Module &, const PreservedAnalyses &PA,
+ ModuleAnalysisManager::Invalidator &) {
+ // Check whether the analysis, all analyses on functions, or the function's
+ // CFG have been preserved.
+ auto PAC = PA.getChecker<llvm::LazyCallGraphAnalysis>();
+ return !(PAC.preserved() || PAC.preservedSet<AllAnalysesOn<Module>>() ||
+ PAC.preservedSet<CFGAnalyses>());
+}
+
LazyCallGraph &LazyCallGraph::operator=(LazyCallGraph &&G) {
BPA = std::move(G.BPA);
NodeMap = std::move(G.NodeMap);
Index: llvm/include/llvm/Analysis/LazyCallGraph.h
===================================================================
--- llvm/include/llvm/Analysis/LazyCallGraph.h
+++ llvm/include/llvm/Analysis/LazyCallGraph.h
@@ -937,6 +937,9 @@
LazyCallGraph(LazyCallGraph &&G);
LazyCallGraph &operator=(LazyCallGraph &&RHS);
+ bool invalidate(Module &, const PreservedAnalyses &PA,
+ ModuleAnalysisManager::Invalidator &);
+
EdgeSequence::iterator begin() { return EntryEdges.begin(); }
EdgeSequence::iterator end() { return EntryEdges.end(); }
-------------- next part --------------
A non-text attachment was scrubbed...
Name: D72817.238830.patch
Type: text/x-patch
Size: 1370 bytes
Desc: not available
URL: <http://lists.llvm.org/pipermail/llvm-commits/attachments/20200117/69198ebc/attachment.bin>
More information about the llvm-commits
mailing list