aboutsummaryrefslogtreecommitdiff
path: root/include/llvm/Analysis/DataStructure/DSSupport.h
diff options
context:
space:
mode:
authorChris Lattner <sabre@nondot.org>2003-01-29 21:09:59 +0000
committerChris Lattner <sabre@nondot.org>2003-01-29 21:09:59 +0000
commit9e4b15b1a19b0903a14429f841b7b6a160dae44d (patch)
treeda7f1ff56c05e79f2d5ce6675900d253706a5558 /include/llvm/Analysis/DataStructure/DSSupport.h
parenta4a684e4332400c4c38649375135b0023985112d (diff)
New API for traversing graph
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@5430 91177308-0d34-0410-b5e6-96231b3b80d8
Diffstat (limited to 'include/llvm/Analysis/DataStructure/DSSupport.h')
-rw-r--r--include/llvm/Analysis/DataStructure/DSSupport.h7
1 files changed, 7 insertions, 0 deletions
diff --git a/include/llvm/Analysis/DataStructure/DSSupport.h b/include/llvm/Analysis/DataStructure/DSSupport.h
index 29351cc8e5..f0f261e0b9 100644
--- a/include/llvm/Analysis/DataStructure/DSSupport.h
+++ b/include/llvm/Analysis/DataStructure/DSSupport.h
@@ -9,6 +9,7 @@
#include <vector>
#include <map>
+#include <set>
#include <functional>
#include <string>
@@ -214,6 +215,12 @@ public:
getPtrArg(a).mergeWith(CS.getPtrArg(a));
}
+ /// markReachableNodes - This method recursively traverses the specified
+ /// DSNodes, marking any nodes which are reachable. All reachable nodes it
+ /// adds to the set, which allows it to only traverse visited nodes once.
+ ///
+ void markReachableNodes(std::set<DSNode*> &Nodes);
+
bool operator<(const DSCallSite &CS) const {
if (Callee < CS.Callee) return true; // This must sort by callee first!
if (Callee > CS.Callee) return false;