add a method to compute a commonly used mapping.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@20588 91177308-0d34-0410-b5e6-96231b3b80d8
This commit is contained in:
Chris Lattner
2005-03-14 19:22:47 +00:00
parent 62b2b22573
commit b2b17bb65b
2 changed files with 16 additions and 5 deletions

View File

@ -45,13 +45,11 @@ static void CheckAllGraphs(Module *M, GT &ECGraphs) {
for (Module::iterator I = M->begin(), E = M->end(); I != E; ++I)
if (!I->isExternal()) {
DSGraph &G = ECGraphs.getDSGraph(*I);
if (G.getReturnNodes().begin()->first != I)
continue; // Only check a graph once.
DSGraph::NodeMapTy GlobalsGraphNodeMapping;
for (DSScalarMap::global_iterator I = G.getScalarMap().global_begin(),
E = G.getScalarMap().global_end(); I != E; ++I)
DSGraph::computeNodeMapping(G.getNodeForValue(*I),
GG.getNodeForValue(*I),
GlobalsGraphNodeMapping);
G.computeGlobalGraphMapping(GlobalsGraphNodeMapping);
}
}
#endif