From: Chris Lattner Date: Tue, 15 Mar 2005 00:58:16 +0000 (+0000) Subject: rename method, add counterpart X-Git-Url: http://demsky.eecs.uci.edu/git/?a=commitdiff_plain;h=b0f92e3ed3778dfaa9511b6c0edb6dae97fe894f;p=oota-llvm.git rename method, add counterpart git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@20593 91177308-0d34-0410-b5e6-96231b3b80d8 --- diff --git a/lib/Analysis/DataStructure/DataStructure.cpp b/lib/Analysis/DataStructure/DataStructure.cpp index 1e47203f423..a73a942fc7e 100644 --- a/lib/Analysis/DataStructure/DataStructure.cpp +++ b/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/lib/Analysis/DataStructure/EquivClassGraphs.cpp b/lib/Analysis/DataStructure/EquivClassGraphs.cpp index 58aaf2e2a5e..4ada4dcca5e 100644 --- a/lib/Analysis/DataStructure/EquivClassGraphs.cpp +++ b/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