[PATCH] D111275: [LCG] Don't skip invalidation of LazyCallGraph if CFG analyses are preserved
Arthur Eubanks via Phabricator via llvm-commits
llvm-commits at lists.llvm.org
Mon Oct 11 13:34:43 PDT 2021
This revision was landed with ongoing or failed builds.
This revision was automatically updated to reflect the committed changes.
Closed by commit rG259390de9af6: [LCG] Don't skip invalidation of LazyCallGraph if CFG analyses are preserved (authored by aeubanks).
Repository:
rG LLVM Github Monorepo
CHANGES SINCE LAST ACTION
https://reviews.llvm.org/D111275/new/
https://reviews.llvm.org/D111275
Files:
llvm/lib/Analysis/LazyCallGraph.cpp
llvm/test/Analysis/LazyCallGraph/invalidate.ll
Index: llvm/test/Analysis/LazyCallGraph/invalidate.ll
===================================================================
--- /dev/null
+++ llvm/test/Analysis/LazyCallGraph/invalidate.ll
@@ -0,0 +1,10 @@
+; Make sure we invalidate lcg even when preserving domtree
+; RUN: opt -passes='require<lcg>,function(instcombine)' -debug-pass-manager -disable-output < %s 2>&1 | FileCheck %s
+
+; CHECK: Invalidating {{.*}} LazyCallGraphAnalysis
+
+define void @f() {
+lbl:
+ %a = add i32 1, 2
+ unreachable
+}
Index: llvm/lib/Analysis/LazyCallGraph.cpp
===================================================================
--- llvm/lib/Analysis/LazyCallGraph.cpp
+++ llvm/lib/Analysis/LazyCallGraph.cpp
@@ -220,8 +220,7 @@
// 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>());
+ return !(PAC.preserved() || PAC.preservedSet<AllAnalysesOn<Module>>());
}
LazyCallGraph &LazyCallGraph::operator=(LazyCallGraph &&G) {
-------------- next part --------------
A non-text attachment was scrubbed...
Name: D111275.378782.patch
Type: text/x-patch
Size: 1148 bytes
Desc: not available
URL: <http://lists.llvm.org/pipermail/llvm-commits/attachments/20211011/c8f98a4c/attachment-0001.bin>
More information about the llvm-commits
mailing list