[llvm] r310162 - [LCG] Remove the complex walk of the parent sets to update graph
Chandler Carruth via llvm-commits
llvm-commits at lists.llvm.org
Fri Aug 4 20:37:38 PDT 2017
Author: chandlerc
Date: Fri Aug 4 20:37:38 2017
New Revision: 310162
URL: http://llvm.org/viewvc/llvm-project?rev=310162&view=rev
Log:
[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.
Modified:
llvm/trunk/lib/Analysis/LazyCallGraph.cpp
Modified: llvm/trunk/lib/Analysis/LazyCallGraph.cpp
URL: http://llvm.org/viewvc/llvm-project/llvm/trunk/lib/Analysis/LazyCallGraph.cpp?rev=310162&r1=310161&r2=310162&view=diff
==============================================================================
--- llvm/trunk/lib/Analysis/LazyCallGraph.cpp (original)
+++ llvm/trunk/lib/Analysis/LazyCallGraph.cpp Fri Aug 4 20:37:38 2017
@@ -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,
More information about the llvm-commits
mailing list