diff --git a/llvm/lib/Analysis/DataStructure/TopDownClosure.cpp b/llvm/lib/Analysis/DataStructure/TopDownClosure.cpp index 834c594b29d3602aa3a5f26b0b635656fe6c85d1..117556940093043d4e99fabea6bc9fd69a23a290 100644 --- a/llvm/lib/Analysis/DataStructure/TopDownClosure.cpp +++ b/llvm/lib/Analysis/DataStructure/TopDownClosure.cpp @@ -135,6 +135,7 @@ void TDDataStructures::calculateGraphFrom(Function &F) { void TDDataStructures::inlineGraphIntoCallees(DSGraph &Graph) { // Recompute the Incomplete markers and eliminate unreachable nodes. + Graph.removeTriviallyDeadNodes(); Graph.maskIncompleteMarkers(); // If any of the functions has incomplete incoming arguments, don't mark any