diff options
author | Chandler Carruth <chandlerc@gmail.com> | 2014-04-26 03:36:42 +0000 |
---|---|---|
committer | Chandler Carruth <chandlerc@gmail.com> | 2014-04-26 03:36:42 +0000 |
commit | dec9a2ca23b115247170bc439983f7dd55757b61 (patch) | |
tree | fb658017ada1f94ba40ed711e68bc882316c2381 /include | |
parent | 0c8f0bfce2edbd1f22604c5243b7ae016067a2ad (diff) | |
download | llvm-dec9a2ca23b115247170bc439983f7dd55757b61.tar.gz llvm-dec9a2ca23b115247170bc439983f7dd55757b61.tar.bz2 llvm-dec9a2ca23b115247170bc439983f7dd55757b61.tar.xz |
[LCG] In the incremental SCC re-formation, lift the node currently being
processed in the DFS out of the stack completely. Keep it exclusively in
a variable. Re-shuffle some code structure to make this easier. This can
have a very dramatic effect in some cases because call graphs tend to
look like a high fan-out spanning tree. As a consequence, there are
a large number of leaf nodes in the graph, and this technique causes
leaf nodes to never even go into the stack. While this only reduces the
max depth by 1, it may cause the total number of round trips through the
stack to drop by a lot.
Now, most of this isn't really relevant for the incremental version. =]
But I wanted to prototype it first here as this variant is in ways more
complex. As long as I can get the code factored well here, I'll next
make the primary walk look the same. There are several refactorings this
exposes I think.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@207306 91177308-0d34-0410-b5e6-96231b3b80d8
Diffstat (limited to 'include')
-rw-r--r-- | include/llvm/Analysis/LazyCallGraph.h | 2 |
1 files changed, 2 insertions, 0 deletions
diff --git a/include/llvm/Analysis/LazyCallGraph.h b/include/llvm/Analysis/LazyCallGraph.h index 940a7cd788..c59d057261 100644 --- a/include/llvm/Analysis/LazyCallGraph.h +++ b/include/llvm/Analysis/LazyCallGraph.h @@ -132,6 +132,8 @@ public: : G(&G), NI(Nodes.end()) {} public: + iterator() {} + bool operator==(const iterator &Arg) const { return NI == Arg.NI; } bool operator!=(const iterator &Arg) const { return !operator==(Arg); } |