[llvm] bf52210 - [NFC][LazyCallGraph] Remove check in removeDeadFunction() if graph is empty
Arthur Eubanks via llvm-commits
llvm-commits at lists.llvm.org
Tue Jan 11 10:17:25 PST 2022
Author: Arthur Eubanks
Date: 2022-01-11T10:17:13-08:00
New Revision: bf52210e25e2c19203d9e2663d80befb405d385b
URL: https://github.com/llvm/llvm-project/commit/bf52210e25e2c19203d9e2663d80befb405d385b
DIFF: https://github.com/llvm/llvm-project/commit/bf52210e25e2c19203d9e2663d80befb405d385b.diff
LOG: [NFC][LazyCallGraph] Remove check in removeDeadFunction() if graph is empty
If we're in removeDeadFunction(), we should have already constructed the call graph.
Differential Revision: https://reviews.llvm.org/D115676
Added:
Modified:
llvm/lib/Analysis/LazyCallGraph.cpp
Removed:
################################################################################
diff --git a/llvm/lib/Analysis/LazyCallGraph.cpp b/llvm/lib/Analysis/LazyCallGraph.cpp
index d3e1aa7c8d9a..ecac2d204f25 100644
--- a/llvm/lib/Analysis/LazyCallGraph.cpp
+++ b/llvm/lib/Analysis/LazyCallGraph.cpp
@@ -1522,13 +1522,6 @@ void LazyCallGraph::removeDeadFunction(Function &F) {
// Remove this from the entry edges if present.
EntryEdges.removeEdgeInternal(N);
- if (SCCMap.empty()) {
- // No SCCs have been formed, so removing this is fine and there is nothing
- // else necessary at this point but clearing out the node.
- N.clear();
- return;
- }
-
// Cannot remove a function which has yet to be visited in the DFS walk, so
// if we have a node at all then we must have an SCC and RefSCC.
auto CI = SCCMap.find(&N);
More information about the llvm-commits
mailing list