[PATCH] D72818: [GlobalsModRef] Add invalidate method
Alina Sbirlea via Phabricator via llvm-commits
llvm-commits at lists.llvm.org
Thu Jan 16 09:44:34 PST 2020
asbirlea updated this revision to Diff 238531.
asbirlea marked an inline comment as done.
asbirlea added a comment.
Address comment.
Repository:
rG LLVM Github Monorepo
CHANGES SINCE LAST ACTION
https://reviews.llvm.org/D72818/new/
https://reviews.llvm.org/D72818
Files:
llvm/include/llvm/Analysis/GlobalsModRef.h
llvm/lib/Analysis/GlobalsModRef.cpp
Index: llvm/lib/Analysis/GlobalsModRef.cpp
===================================================================
--- llvm/lib/Analysis/GlobalsModRef.cpp
+++ llvm/lib/Analysis/GlobalsModRef.cpp
@@ -810,6 +810,12 @@
return true;
}
+bool GlobalsAAResult::invalidate(Module &, const PreservedAnalyses &PA,
+ ModuleAnalysisManager::Invalidator &) {
+ auto PAC = PA.getChecker<GlobalsAA>();
+ return !PAC.preservedWhenStateless();
+}
+
/// alias - If one of the pointers is to a global that we are tracking, and the
/// other is some random pointer, we know there cannot be an alias, because the
/// address of the global isn't taken.
Index: llvm/include/llvm/Analysis/GlobalsModRef.h
===================================================================
--- llvm/include/llvm/Analysis/GlobalsModRef.h
+++ llvm/include/llvm/Analysis/GlobalsModRef.h
@@ -83,6 +83,9 @@
GlobalsAAResult(GlobalsAAResult &&Arg);
~GlobalsAAResult();
+ bool invalidate(Module &M, const PreservedAnalyses &PA,
+ ModuleAnalysisManager::Invalidator &);
+
static GlobalsAAResult
analyzeModule(Module &M,
std::function<const TargetLibraryInfo &(Function &F)> GetTLI,
-------------- next part --------------
A non-text attachment was scrubbed...
Name: D72818.238531.patch
Type: text/x-patch
Size: 1220 bytes
Desc: not available
URL: <http://lists.llvm.org/pipermail/llvm-commits/attachments/20200116/f004d0b5/attachment.bin>
More information about the llvm-commits
mailing list