[llvm-commits] CVS: llvm/lib/Analysis/DataStructure/DataStructure.cpp EquivClassGraphs.cpp

Chris Lattner lattner at cs.uiuc.edu
Mon Mar 14 16:58:30 PST 2005



Changes in directory llvm/lib/Analysis/DataStructure:

DataStructure.cpp updated: 1.200 -> 1.201
EquivClassGraphs.cpp updated: 1.25 -> 1.26
---
Log message:

rename method, add counterpart


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

 DataStructure.cpp    |   18 +++++++++++++++---
 EquivClassGraphs.cpp |    2 +-
 2 files changed, 16 insertions(+), 4 deletions(-)


Index: llvm/lib/Analysis/DataStructure/DataStructure.cpp
diff -u llvm/lib/Analysis/DataStructure/DataStructure.cpp:1.200 llvm/lib/Analysis/DataStructure/DataStructure.cpp:1.201
--- llvm/lib/Analysis/DataStructure/DataStructure.cpp:1.200	Mon Mar 14 13:22:47 2005
+++ llvm/lib/Analysis/DataStructure/DataStructure.cpp	Mon Mar 14 18:58:16 2005
@@ -2084,9 +2084,10 @@
 }
 
 
-/// computeGlobalGraphMapping - Compute the mapping of nodes in the global
-/// graph to nodes in this graph.
-void DSGraph::computeGlobalGraphMapping(NodeMapTy &NodeMap) {
+/// computeGToGGMapping - Compute the mapping of nodes in the global graph to
+/// nodes in this graph.  Note that any uses of this method are probably bugs,
+/// unless it is known that the globals graph has been merged into this graph!
+void DSGraph::computeGToGGMapping(NodeMapTy &NodeMap) {
   DSGraph &GG = *getGlobalsGraph();
 
   DSScalarMap &SM = getScalarMap();
@@ -2095,3 +2096,14 @@
     DSGraph::computeNodeMapping(SM[*I], GG.getNodeForValue(*I), NodeMap);
 }
                                 
+/// computeGGToGMapping - Compute the mapping of nodes in the global graph to
+/// nodes in this graph.
+void DSGraph::computeGGToGMapping(NodeMapTy &NodeMap) {
+  DSGraph &GG = *getGlobalsGraph();
+
+  DSScalarMap &SM = getScalarMap();
+  for (DSScalarMap::global_iterator I = SM.global_begin(),
+         E = SM.global_end(); I != E; ++I)
+    DSGraph::computeNodeMapping(GG.getNodeForValue(*I), SM[*I], NodeMap);
+}
+                                


Index: llvm/lib/Analysis/DataStructure/EquivClassGraphs.cpp
diff -u llvm/lib/Analysis/DataStructure/EquivClassGraphs.cpp:1.25 llvm/lib/Analysis/DataStructure/EquivClassGraphs.cpp:1.26
--- llvm/lib/Analysis/DataStructure/EquivClassGraphs.cpp:1.25	Mon Mar 14 13:22:47 2005
+++ llvm/lib/Analysis/DataStructure/EquivClassGraphs.cpp	Mon Mar 14 18:58:16 2005
@@ -49,7 +49,7 @@
         continue;  // Only check a graph once.
 
       DSGraph::NodeMapTy GlobalsGraphNodeMapping;
-      G.computeGlobalGraphMapping(GlobalsGraphNodeMapping);
+      G.computeGToGGMapping(GlobalsGraphNodeMapping);
     } 
 }
 #endif






More information about the llvm-commits mailing list