[llvm-commits] [vector_llvm] CVS: llvm/include/llvm/Analysis/DataStructure/DSGraph.h DataStructure.h

Robert Bocchino bocchino at cs.uiuc.edu
Tue Oct 18 12:22:21 PDT 2005



Changes in directory llvm/include/llvm/Analysis/DataStructure:

DSGraph.h updated: 1.109 -> 1.109.4.1
DataStructure.h updated: 1.94 -> 1.94.4.1
---
Log message:

Initial commit of Vector LLVM.


---
Diffs of the changes:  (+16 -3)

 DSGraph.h       |    7 ++++---
 DataStructure.h |   12 ++++++++++++
 2 files changed, 16 insertions(+), 3 deletions(-)


Index: llvm/include/llvm/Analysis/DataStructure/DSGraph.h
diff -u llvm/include/llvm/Analysis/DataStructure/DSGraph.h:1.109 llvm/include/llvm/Analysis/DataStructure/DSGraph.h:1.109.4.1
--- llvm/include/llvm/Analysis/DataStructure/DSGraph.h:1.109	Thu Apr 21 15:18:05 2005
+++ llvm/include/llvm/Analysis/DataStructure/DSGraph.h	Tue Oct 18 14:21:56 2005
@@ -437,9 +437,10 @@
 
   void updateFromGlobalGraph();
 
-  /// computeNodeMapping - Given roots in two different DSGraphs, traverse the
-  /// nodes reachable from the two graphs, computing the mapping of nodes from
-  /// the first to the second graph.
+  /// computeNodeMapping - Given roots in two different DSGraphs,
+  /// traverse the nodes reachable from the two graphs, computing the
+  /// mapping of nodes from the first to the second graph.  Returns
+  /// true if mapping succeeded, false otherwise.
   ///
   static void computeNodeMapping(const DSNodeHandle &NH1,
                                  const DSNodeHandle &NH2, NodeMapTy &NodeMap,


Index: llvm/include/llvm/Analysis/DataStructure/DataStructure.h
diff -u llvm/include/llvm/Analysis/DataStructure/DataStructure.h:1.94 llvm/include/llvm/Analysis/DataStructure/DataStructure.h:1.94.4.1
--- llvm/include/llvm/Analysis/DataStructure/DataStructure.h:1.94	Thu Apr 21 15:18:05 2005
+++ llvm/include/llvm/Analysis/DataStructure/DataStructure.h	Tue Oct 18 14:21:56 2005
@@ -191,6 +191,12 @@
   hash_map<Function*, DSGraph*> DSInfo;
   hash_set<Function*> ArgsRemainIncomplete;
   DSGraph *GlobalsGraph;
+
+  // --- RLB start ---
+  // SCCs of call graph, in reverse postorder
+  std::vector<DSGraph*> SCCs;
+  // --- RLB end ---
+
   BUDataStructures *BUInfo;
 
   /// GlobalECs - The equivalence classes for each global value that is merged
@@ -266,6 +272,12 @@
     AU.addRequired<BUDataStructures>();
   }
 
+  // --- RLB begin ---
+  typedef std::vector<DSGraph*>::const_iterator SCC_iterator;
+  SCC_iterator SCC_begin() const { return SCCs.begin(); }
+  SCC_iterator SCC_end() const { return SCCs.end(); }
+  // --- RLB end ---
+
 private:
   void markReachableFunctionsExternallyAccessible(DSNode *N,
                                                   hash_set<DSNode*> &Visited);






More information about the llvm-commits mailing list