summaryrefslogtreecommitdiffstats
path: root/llvm/lib
diff options
context:
space:
mode:
authorChandler Carruth <chandlerc@gmail.com>2017-08-05 03:37:38 +0000
committerChandler Carruth <chandlerc@gmail.com>2017-08-05 03:37:38 +0000
commit2c58e1a45c6d71b256cba2dc9df726d855d1ad1e (patch)
treef2631352296825403078db45df325c54ff6a81f9 /llvm/lib
parent13ffd110ada372b07140a635b86a21e5a142c461 (diff)
downloadbcm5719-llvm-2c58e1a45c6d71b256cba2dc9df726d855d1ad1e.tar.gz
bcm5719-llvm-2c58e1a45c6d71b256cba2dc9df726d855d1ad1e.zip
[LCG] Remove the complex walk of the parent sets to update graph
pointers. This is completely unnecessary as we have a trivial list of RefSCCs now that we can walk. llvm-svn: 310162
Diffstat (limited to 'llvm/lib')
-rw-r--r--llvm/lib/Analysis/LazyCallGraph.cpp13
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,
OpenPOWER on IntegriCloud