[llvm-commits] CVS: llvm/include/llvm/Analysis/DSNode.h DSSupport.h

Chris Lattner lattner at cs.uiuc.edu
Wed Jan 29 15:11:02 PST 2003


Changes in directory llvm/include/llvm/Analysis:

DSNode.h updated: 1.16 -> 1.17
DSSupport.h updated: 1.8 -> 1.9

---
Log message:

New API for traversing graph


---
Diffs of the changes:

Index: llvm/include/llvm/Analysis/DSNode.h
diff -u llvm/include/llvm/Analysis/DSNode.h:1.16 llvm/include/llvm/Analysis/DSNode.h:1.17
--- llvm/include/llvm/Analysis/DSNode.h:1.16	Fri Dec  6 15:10:17 2002
+++ llvm/include/llvm/Analysis/DSNode.h	Wed Jan 29 15:09:59 2003
@@ -218,6 +218,12 @@
   /// 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;
 


Index: llvm/include/llvm/Analysis/DSSupport.h
diff -u llvm/include/llvm/Analysis/DSSupport.h:1.8 llvm/include/llvm/Analysis/DSSupport.h:1.9
--- llvm/include/llvm/Analysis/DSSupport.h:1.8	Mon Nov 18 15:45:07 2002
+++ llvm/include/llvm/Analysis/DSSupport.h	Wed Jan 29 15:09:59 2003
@@ -9,6 +9,7 @@
 
 #include <vector>
 #include <map>
+#include <set>
 #include <functional>
 #include <string>
 
@@ -213,6 +214,12 @@
     for (unsigned a = 0; a != MinArgs; ++a)
       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!





More information about the llvm-commits mailing list