aboutsummaryrefslogtreecommitdiff
path: root/lib/Analysis/DataStructure/EquivClassGraphs.cpp
diff options
context:
space:
mode:
authorChris Lattner <sabre@nondot.org>2005-03-14 19:22:47 +0000
committerChris Lattner <sabre@nondot.org>2005-03-14 19:22:47 +0000
commitb2b17bb65b0271709cc20265e1467ab39782f2ee (patch)
tree0c913578d95da72b1860f0b2b0507669f16e8cda /lib/Analysis/DataStructure/EquivClassGraphs.cpp
parent62b2b22573e921ce008b687aa3dcc56ad06fd02f (diff)
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
Diffstat (limited to 'lib/Analysis/DataStructure/EquivClassGraphs.cpp')
-rw-r--r--lib/Analysis/DataStructure/EquivClassGraphs.cpp8
1 files changed, 3 insertions, 5 deletions
diff --git a/lib/Analysis/DataStructure/EquivClassGraphs.cpp b/lib/Analysis/DataStructure/EquivClassGraphs.cpp
index 8e69291cdb..58aaf2e2a5 100644
--- a/lib/Analysis/DataStructure/EquivClassGraphs.cpp
+++ b/lib/Analysis/DataStructure/EquivClassGraphs.cpp
@@ -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