diff options
author | Chandler Carruth <chandlerc@gmail.com> | 2014-04-24 09:22:31 +0000 |
---|---|---|
committer | Chandler Carruth <chandlerc@gmail.com> | 2014-04-24 09:22:31 +0000 |
commit | 493e0a6ad0a5b69eb7f6231399a16f4211285619 (patch) | |
tree | e3b06dc5f348faf0f3ecbf9c1aac06fbe822b830 /llvm/lib/Analysis | |
parent | d52f8e0e4dd0106ea7da078039f7945e52baaa7e (diff) | |
download | bcm5719-llvm-493e0a6ad0a5b69eb7f6231399a16f4211285619.tar.gz bcm5719-llvm-493e0a6ad0a5b69eb7f6231399a16f4211285619.zip |
[LCG] Switch the parent SCC tracking from a SmallSetVector to
a SmallPtrSet. Currently, there is no need for stable iteration in this
dimension, and I now thing there won't need to be going forward.
If this is ever re-introduced in any form, it needs to not be
a SetVector based solution because removal cannot be linear. There will
be many SCCs with large numbers of parents. When encountering these, the
incremental SCC update for intra-SCC edge removal was quadratic due to
linear removal (kind of).
I'm really hoping we can avoid having an ordering property here at all
though...
llvm-svn: 207091
Diffstat (limited to 'llvm/lib/Analysis')
-rw-r--r-- | llvm/lib/Analysis/LazyCallGraph.cpp | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/llvm/lib/Analysis/LazyCallGraph.cpp b/llvm/lib/Analysis/LazyCallGraph.cpp index 832d2b9e7e6..c4d597e2f4f 100644 --- a/llvm/lib/Analysis/LazyCallGraph.cpp +++ b/llvm/lib/Analysis/LazyCallGraph.cpp @@ -157,7 +157,7 @@ void LazyCallGraph::SCC::removeEdge(LazyCallGraph &G, Function &Caller, // the caller no longer a parent of the callee. Walk the other call edges // in the caller to tell. if (!HasOtherCallToCalleeC) { - bool Removed = CalleeC.ParentSCCs.remove(this); + bool Removed = CalleeC.ParentSCCs.erase(this); (void)Removed; assert(Removed && "Did not find the caller SCC in the callee SCC's parent list!"); @@ -239,7 +239,7 @@ LazyCallGraph::SCC::removeInternalEdge(LazyCallGraph &G, Node &Caller, // However, we do need to remove this SCC from its SCC's parent set. SCC &ChildSCC = *G.SCCMap.lookup(&ChildN); if (&ChildSCC != this) { - ChildSCC.ParentSCCs.remove(this); + ChildSCC.ParentSCCs.erase(this); continue; } |