summaryrefslogtreecommitdiffstats
path: root/llvm/lib/Analysis/DataStructure/DataStructure.cpp
diff options
context:
space:
mode:
authorChris Lattner <sabre@nondot.org>2004-02-07 23:58:05 +0000
committerChris Lattner <sabre@nondot.org>2004-02-07 23:58:05 +0000
commitce74c2f50b4e621cbd89bba25579bde0547b8b59 (patch)
treef2bd58f0f0ea091cf5d2871917e1490202eea784 /llvm/lib/Analysis/DataStructure/DataStructure.cpp
parent06834e6d7bc1699ba6487e091b78e4ce7a6071cd (diff)
downloadbcm5719-llvm-ce74c2f50b4e621cbd89bba25579bde0547b8b59.tar.gz
bcm5719-llvm-ce74c2f50b4e621cbd89bba25579bde0547b8b59.zip
getNodes() is gone, use node_begin/end instead
Rename stats from dsnode -> dsa Add a new stat llvm-svn: 11167
Diffstat (limited to 'llvm/lib/Analysis/DataStructure/DataStructure.cpp')
-rw-r--r--llvm/lib/Analysis/DataStructure/DataStructure.cpp12
1 files changed, 7 insertions, 5 deletions
diff --git a/llvm/lib/Analysis/DataStructure/DataStructure.cpp b/llvm/lib/Analysis/DataStructure/DataStructure.cpp
index 5050515bc28..ca1d8c623da 100644
--- a/llvm/lib/Analysis/DataStructure/DataStructure.cpp
+++ b/llvm/lib/Analysis/DataStructure/DataStructure.cpp
@@ -26,9 +26,10 @@
using namespace llvm;
namespace {
- Statistic<> NumFolds ("dsnode", "Number of nodes completely folded");
- Statistic<> NumCallNodesMerged("dsnode", "Number of call nodes merged");
- Statistic<> NumNodeAllocated ("dsnode", "Number of nodes allocated");
+ Statistic<> NumFolds ("dsa", "Number of nodes completely folded");
+ Statistic<> NumCallNodesMerged("dsa", "Number of call nodes merged");
+ Statistic<> NumNodeAllocated ("dsa", "Number of nodes allocated");
+ Statistic<> NumDNE ("dsa", "Number of nodes removed by reachability");
cl::opt<bool>
EnableDSNodeGlobalRootsHack("enable-dsa-globalrootshack", cl::Hidden,
@@ -73,7 +74,7 @@ DSNode::DSNode(const Type *T, DSGraph *G)
: NumReferrers(0), Size(0), ParentGraph(G), Ty(Type::VoidTy), NodeType(0) {
// Add the type entry if it is specified...
if (T) mergeTypeInfo(T, 0);
- G->getNodes().push_back(this);
+ G->addNode(this);
++NumNodeAllocated;
}
@@ -85,7 +86,7 @@ DSNode::DSNode(const DSNode &N, DSGraph *G, bool NullLinks)
Links = N.Links;
else
Links.resize(N.Links.size()); // Create the appropriate number of null links
- G->getNodes().push_back(this);
+ G->addNode(this);
++NumNodeAllocated;
}
@@ -1757,6 +1758,7 @@ void DSGraph::removeDeadNodes(unsigned Flags) {
DeadNodes.reserve(Nodes.size());
for (unsigned i = 0; i != Nodes.size(); ++i)
if (!Alive.count(Nodes[i])) {
+ ++NumDNE;
DSNode *N = Nodes[i];
Nodes[i--] = Nodes.back(); // move node to end of vector
Nodes.pop_back(); // Erase node from alive list.
OpenPOWER on IntegriCloud