Skip to content

Commit 3e2b424

Browse files
committed
Remove RefSCC::handleTrivialEdgeInsertion
This function no longer does anything useful. It probably did something originally but latter changes removed them and didn't clean up this function. The checks are already done in the callers as well. Differential Revision: https://reviews.llvm.org/D94055
1 parent b6c8feb commit 3e2b424

File tree

2 files changed

+0
-27
lines changed

2 files changed

+0
-27
lines changed

llvm/include/llvm/Analysis/LazyCallGraph.h

Lines changed: 0 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -598,10 +598,6 @@ class LazyCallGraph {
598598
void verify();
599599
#endif
600600

601-
/// Handle any necessary parent set updates after inserting a trivial ref
602-
/// or call edge.
603-
void handleTrivialEdgeInsertion(Node &SourceN, Node &TargetN);
604-
605601
public:
606602
using iterator = pointee_iterator<SmallVectorImpl<SCC *>::const_iterator>;
607603
using range = iterator_range<iterator>;

llvm/lib/Analysis/LazyCallGraph.cpp

Lines changed: 0 additions & 23 deletions
Original file line numberDiff line numberDiff line change
@@ -1373,23 +1373,6 @@ LazyCallGraph::RefSCC::removeInternalRefEdge(Node &SourceN,
13731373
return Result;
13741374
}
13751375

1376-
void LazyCallGraph::RefSCC::handleTrivialEdgeInsertion(Node &SourceN,
1377-
Node &TargetN) {
1378-
// The only trivial case that requires any graph updates is when we add new
1379-
// ref edge and may connect different RefSCCs along that path. This is only
1380-
// because of the parents set. Every other part of the graph remains constant
1381-
// after this edge insertion.
1382-
assert(G->lookupRefSCC(SourceN) == this && "Source must be in this RefSCC.");
1383-
RefSCC &TargetRC = *G->lookupRefSCC(TargetN);
1384-
if (&TargetRC == this)
1385-
return;
1386-
1387-
#ifdef EXPENSIVE_CHECKS
1388-
assert(TargetRC.isDescendantOf(*this) &&
1389-
"Target must be a descendant of the Source.");
1390-
#endif
1391-
}
1392-
13931376
void LazyCallGraph::RefSCC::insertTrivialCallEdge(Node &SourceN,
13941377
Node &TargetN) {
13951378
#ifndef NDEBUG
@@ -1420,9 +1403,6 @@ void LazyCallGraph::RefSCC::insertTrivialCallEdge(Node &SourceN,
14201403
// Create the new edge.
14211404
SourceN->Edges.emplace_back(TargetN, Edge::Call);
14221405
}
1423-
1424-
// Now that we have the edge, handle the graph fallout.
1425-
handleTrivialEdgeInsertion(SourceN, TargetN);
14261406
}
14271407

14281408
void LazyCallGraph::RefSCC::insertTrivialRefEdge(Node &SourceN, Node &TargetN) {
@@ -1449,9 +1429,6 @@ void LazyCallGraph::RefSCC::insertTrivialRefEdge(Node &SourceN, Node &TargetN) {
14491429

14501430
// Create the new edge.
14511431
SourceN->Edges.emplace_back(TargetN, Edge::Ref);
1452-
1453-
// Now that we have the edge, handle the graph fallout.
1454-
handleTrivialEdgeInsertion(SourceN, TargetN);
14551432
}
14561433

14571434
void LazyCallGraph::RefSCC::replaceNodeFunction(Node &N, Function &NewF) {

0 commit comments

Comments
 (0)