Add method to get # nodes in the graph
authorChris Lattner <sabre@nondot.org>
Thu, 4 Apr 2002 19:20:00 +0000 (19:20 +0000)
committerChris Lattner <sabre@nondot.org>
Thu, 4 Apr 2002 19:20:00 +0000 (19:20 +0000)
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@2098 91177308-0d34-0410-b5e6-96231b3b80d8

include/llvm/Analysis/DataStructure.h
include/llvm/Analysis/DataStructure/DataStructure.h

index 3dce04321ab450227927d6c96e14a6691c16c2a7..335477fb6cefd99946f741cf2e9162ab1211fc40 100644 (file)
@@ -432,6 +432,10 @@ public:
 
   const PointerValSet &getRetNodes() const { return RetNode; }
 
+  unsigned getGraphSize() const {
+    return ArgNodes.size() + AllocNodes.size() + ShadowNodes.size() +
+      GlobalNodes.size() + CallNodes.size();
+  }
 
   void printFunction(std::ostream &O, const char *Label) const;
 };
index 3dce04321ab450227927d6c96e14a6691c16c2a7..335477fb6cefd99946f741cf2e9162ab1211fc40 100644 (file)
@@ -432,6 +432,10 @@ public:
 
   const PointerValSet &getRetNodes() const { return RetNode; }
 
+  unsigned getGraphSize() const {
+    return ArgNodes.size() + AllocNodes.size() + ShadowNodes.size() +
+      GlobalNodes.size() + CallNodes.size();
+  }
 
   void printFunction(std::ostream &O, const char *Label) const;
 };