[PATCH] D115676: [NFC][LazyCallGraph] Remove check in removeDeadFunction() if graph is empty

Arthur Eubanks via Phabricator via llvm-commits llvm-commits at lists.llvm.org
Tue Jan 11 10:17:33 PST 2022


This revision was not accepted when it landed; it landed in state "Needs Review".
This revision was landed with ongoing or failed builds.
This revision was automatically updated to reflect the committed changes.
Closed by commit rGbf52210e25e2: [NFC][LazyCallGraph] Remove check in removeDeadFunction() if graph is empty (authored by aeubanks).

Repository:
  rG LLVM Github Monorepo

CHANGES SINCE LAST ACTION
  https://reviews.llvm.org/D115676/new/

https://reviews.llvm.org/D115676

Files:
  llvm/lib/Analysis/LazyCallGraph.cpp


Index: llvm/lib/Analysis/LazyCallGraph.cpp
===================================================================
--- llvm/lib/Analysis/LazyCallGraph.cpp
+++ llvm/lib/Analysis/LazyCallGraph.cpp
@@ -1522,13 +1522,6 @@
   // 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);


-------------- next part --------------
A non-text attachment was scrubbed...
Name: D115676.399005.patch
Type: text/x-patch
Size: 686 bytes
Desc: not available
URL: <http://lists.llvm.org/pipermail/llvm-commits/attachments/20220111/6219d6a5/attachment.bin>


More information about the llvm-commits mailing list