summaryrefslogtreecommitdiffstats
path: root/llvm/lib/Analysis
diff options
context:
space:
mode:
authorChris Lattner <sabre@nondot.org>2005-03-15 00:58:16 +0000
committerChris Lattner <sabre@nondot.org>2005-03-15 00:58:16 +0000
commit26415d743286b58c190a811cf4ae21c116e1c81b (patch)
treee23534f5ed8c2bf5e1e03b1583ad33df30269749 /llvm/lib/Analysis
parent9468d19ce9c566766b772f26d62b52aae300d13f (diff)
downloadbcm5719-llvm-26415d743286b58c190a811cf4ae21c116e1c81b.tar.gz
bcm5719-llvm-26415d743286b58c190a811cf4ae21c116e1c81b.zip
rename method, add counterpart
llvm-svn: 20593
Diffstat (limited to 'llvm/lib/Analysis')
-rw-r--r--llvm/lib/Analysis/DataStructure/DataStructure.cpp18
-rw-r--r--llvm/lib/Analysis/DataStructure/EquivClassGraphs.cpp2
2 files changed, 16 insertions, 4 deletions
diff --git a/llvm/lib/Analysis/DataStructure/DataStructure.cpp b/llvm/lib/Analysis/DataStructure/DataStructure.cpp
index 1e47203f423..a73a942fc7e 100644
--- a/llvm/lib/Analysis/DataStructure/DataStructure.cpp
+++ b/llvm/lib/Analysis/DataStructure/DataStructure.cpp
@@ -2084,9 +2084,10 @@ void DSGraph::computeNodeMapping(const DSNodeHandle &NH1,
}
-/// 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 @@ void DSGraph::computeGlobalGraphMapping(NodeMapTy &NodeMap) {
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);
+}
+
diff --git a/llvm/lib/Analysis/DataStructure/EquivClassGraphs.cpp b/llvm/lib/Analysis/DataStructure/EquivClassGraphs.cpp
index 58aaf2e2a5e..4ada4dcca5e 100644
--- a/llvm/lib/Analysis/DataStructure/EquivClassGraphs.cpp
+++ b/llvm/lib/Analysis/DataStructure/EquivClassGraphs.cpp
@@ -49,7 +49,7 @@ static void CheckAllGraphs(Module *M, GT &ECGraphs) {
continue; // Only check a graph once.
DSGraph::NodeMapTy GlobalsGraphNodeMapping;
- G.computeGlobalGraphMapping(GlobalsGraphNodeMapping);
+ G.computeGToGGMapping(GlobalsGraphNodeMapping);
}
}
#endif
OpenPOWER on IntegriCloud