diff options
Diffstat (limited to 'llvm/lib/Analysis/LazyCallGraph.cpp')
-rw-r--r-- | llvm/lib/Analysis/LazyCallGraph.cpp | 13 |
1 files changed, 2 insertions, 11 deletions
diff --git a/llvm/lib/Analysis/LazyCallGraph.cpp b/llvm/lib/Analysis/LazyCallGraph.cpp index fbf39a23779..690ca7d5122 100644 --- a/llvm/lib/Analysis/LazyCallGraph.cpp +++ b/llvm/lib/Analysis/LazyCallGraph.cpp @@ -1699,17 +1699,8 @@ void LazyCallGraph::updateGraphPtrs() { } } - // Process all SCCs updating the graph pointers. - { - SmallVector<RefSCC *, 16> Worklist(LeafRefSCCs.begin(), LeafRefSCCs.end()); - - while (!Worklist.empty()) { - RefSCC &C = *Worklist.pop_back_val(); - C.G = this; - for (RefSCC &ParentC : C.parents()) - Worklist.push_back(&ParentC); - } - } + for (auto *RC : PostOrderRefSCCs) + RC->G = this; } template <typename RootsT, typename GetBeginT, typename GetEndT, |