summaryrefslogtreecommitdiffstats
path: root/llvm/lib/Analysis/DataStructure/Local.cpp
diff options
context:
space:
mode:
authorChris Lattner <sabre@nondot.org>2005-01-30 23:51:02 +0000
committerChris Lattner <sabre@nondot.org>2005-01-30 23:51:02 +0000
commita1b39fa5ad8862f2a2a4f923e1e51c5285448725 (patch)
tree8d14bd6e7027e7dd16b34a71170856d0231ea5aa /llvm/lib/Analysis/DataStructure/Local.cpp
parent7141334f981dfca37fa9c6a7605e90f5fb701188 (diff)
downloadbcm5719-llvm-a1b39fa5ad8862f2a2a4f923e1e51c5285448725.tar.gz
bcm5719-llvm-a1b39fa5ad8862f2a2a4f923e1e51c5285448725.zip
* Make some methods more const correct.
* Change the FunctionCalls and AuxFunctionCalls vectors into std::lists. This makes many operations on these lists much more natural, and avoids *exteremely* expensive copying of DSCallSites (e.g. moving nodes around between lists, erasing a node from not the end of the vector, etc). With a profile build of analyze, this speeds up BU DS from 25.14s to 12.59s on 176.gcc. I expect that it would help TD even more, but I don't have data for it. This effectively eliminates removeIdenticalCalls and children from the profile, going from 6.53 to 0.27s. llvm-svn: 19939
Diffstat (limited to 'llvm/lib/Analysis/DataStructure/Local.cpp')
-rw-r--r--llvm/lib/Analysis/DataStructure/Local.cpp4
1 files changed, 2 insertions, 2 deletions
diff --git a/llvm/lib/Analysis/DataStructure/Local.cpp b/llvm/lib/Analysis/DataStructure/Local.cpp
index 8d1391f582f..948bf3fc5da 100644
--- a/llvm/lib/Analysis/DataStructure/Local.cpp
+++ b/llvm/lib/Analysis/DataStructure/Local.cpp
@@ -73,11 +73,11 @@ namespace {
DSGraph &G;
DSNodeHandle *RetNode; // Node that gets returned...
DSScalarMap &ScalarMap;
- std::vector<DSCallSite> *FunctionCalls;
+ std::list<DSCallSite> *FunctionCalls;
public:
GraphBuilder(Function &f, DSGraph &g, DSNodeHandle &retNode,
- std::vector<DSCallSite> &fc)
+ std::list<DSCallSite> &fc)
: G(g), RetNode(&retNode), ScalarMap(G.getScalarMap()),
FunctionCalls(&fc) {
OpenPOWER on IntegriCloud