New API for traversing graph

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@5430 91177308-0d34-0410-b5e6-96231b3b80d8
This commit is contained in:
Chris Lattner 2003-01-29 21:09:59 +00:00
parent a4a684e433
commit 9e4b15b1a1
4 changed files with 26 additions and 0 deletions

View File

@ -218,6 +218,12 @@ public:
/// specified mapping.
void remapLinks(std::map<const DSNode*, DSNodeHandle> &OldNodeMap);
/// 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*> &ReachableNodes);
private:
friend class DSNodeHandle;

View File

@ -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;

View File

@ -218,6 +218,12 @@ public:
/// specified mapping.
void remapLinks(std::map<const DSNode*, DSNodeHandle> &OldNodeMap);
/// 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*> &ReachableNodes);
private:
friend class DSNodeHandle;

View File

@ -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;