diff options
author | Arthur Eubanks <aeubanks@google.com> | 2022-01-13 10:09:52 -0800 |
---|---|---|
committer | Arthur Eubanks <aeubanks@google.com> | 2022-01-13 14:29:45 -0800 |
commit | 757e044dce51d01391e3fa2dbff2cd8e16f964cb (patch) | |
tree | 0c91cc47a1162b195393bfd0f1fecbab6d75aaf5 /llvm/lib/Analysis/LazyCallGraph.cpp | |
parent | 00e0de05723a0eee491d4a1ddad69b7fe5265805 (diff) | |
download | llvm-757e044dce51d01391e3fa2dbff2cd8e16f964cb.zip llvm-757e044dce51d01391e3fa2dbff2cd8e16f964cb.tar.gz llvm-757e044dce51d01391e3fa2dbff2cd8e16f964cb.tar.bz2 |
[Inliner] Don't removeDeadConstantUsers() when checking if a function is dead
If a function has many uses, this can take a good chunk of compile times.
Reviewed By: nikic
Differential Revision: https://reviews.llvm.org/D117236
Diffstat (limited to 'llvm/lib/Analysis/LazyCallGraph.cpp')
-rw-r--r-- | llvm/lib/Analysis/LazyCallGraph.cpp | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/llvm/lib/Analysis/LazyCallGraph.cpp b/llvm/lib/Analysis/LazyCallGraph.cpp index ecac2d2..e8e9593 100644 --- a/llvm/lib/Analysis/LazyCallGraph.cpp +++ b/llvm/lib/Analysis/LazyCallGraph.cpp @@ -1503,7 +1503,7 @@ void LazyCallGraph::removeEdge(Node &SourceN, Node &TargetN) { void LazyCallGraph::removeDeadFunction(Function &F) { // FIXME: This is unnecessarily restrictive. We should be able to remove // functions which recursively call themselves. - assert(F.use_empty() && + assert(F.hasZeroLiveUses() && "This routine should only be called on trivially dead functions!"); // We shouldn't remove library functions as they are never really dead while |