diff --git a/llvm/include/llvm/Analysis/LazyCallGraph.h b/llvm/include/llvm/Analysis/LazyCallGraph.h --- a/llvm/include/llvm/Analysis/LazyCallGraph.h +++ b/llvm/include/llvm/Analysis/LazyCallGraph.h @@ -598,10 +598,6 @@ void verify(); #endif - /// Handle any necessary parent set updates after inserting a trivial ref - /// or call edge. - void handleTrivialEdgeInsertion(Node &SourceN, Node &TargetN); - public: using iterator = pointee_iterator::const_iterator>; using range = iterator_range; diff --git a/llvm/lib/Analysis/LazyCallGraph.cpp b/llvm/lib/Analysis/LazyCallGraph.cpp --- a/llvm/lib/Analysis/LazyCallGraph.cpp +++ b/llvm/lib/Analysis/LazyCallGraph.cpp @@ -1373,23 +1373,6 @@ return Result; } -void LazyCallGraph::RefSCC::handleTrivialEdgeInsertion(Node &SourceN, - Node &TargetN) { - // The only trivial case that requires any graph updates is when we add new - // ref edge and may connect different RefSCCs along that path. This is only - // because of the parents set. Every other part of the graph remains constant - // after this edge insertion. - assert(G->lookupRefSCC(SourceN) == this && "Source must be in this RefSCC."); - RefSCC &TargetRC = *G->lookupRefSCC(TargetN); - if (&TargetRC == this) - return; - -#ifdef EXPENSIVE_CHECKS - assert(TargetRC.isDescendantOf(*this) && - "Target must be a descendant of the Source."); -#endif -} - void LazyCallGraph::RefSCC::insertTrivialCallEdge(Node &SourceN, Node &TargetN) { #ifndef NDEBUG @@ -1420,9 +1403,6 @@ // Create the new edge. SourceN->Edges.emplace_back(TargetN, Edge::Call); } - - // Now that we have the edge, handle the graph fallout. - handleTrivialEdgeInsertion(SourceN, TargetN); } void LazyCallGraph::RefSCC::insertTrivialRefEdge(Node &SourceN, Node &TargetN) { @@ -1449,9 +1429,6 @@ // Create the new edge. SourceN->Edges.emplace_back(TargetN, Edge::Ref); - - // Now that we have the edge, handle the graph fallout. - handleTrivialEdgeInsertion(SourceN, TargetN); } void LazyCallGraph::RefSCC::replaceNodeFunction(Node &N, Function &NewF) {