summaryrefslogtreecommitdiffstats
path: root/llvm/lib/Analysis/DataStructure/EquivClassGraphs.cpp
diff options
context:
space:
mode:
authorChris Lattner <sabre@nondot.org>2005-03-15 16:55:04 +0000
committerChris Lattner <sabre@nondot.org>2005-03-15 16:55:04 +0000
commit92d0c1c1bae1e38dfb712aed7d4fad4df3aa42ba (patch)
tree52ad175f54ada0df9b6e284178f2268479b9710e /llvm/lib/Analysis/DataStructure/EquivClassGraphs.cpp
parentf8c924bfcf17bc8752ff2bd7b3484dcb80ac6fc5 (diff)
downloadbcm5719-llvm-92d0c1c1bae1e38dfb712aed7d4fad4df3aa42ba.tar.gz
bcm5719-llvm-92d0c1c1bae1e38dfb712aed7d4fad4df3aa42ba.zip
Start using retnodes_* for iteration.
llvm-svn: 20618
Diffstat (limited to 'llvm/lib/Analysis/DataStructure/EquivClassGraphs.cpp')
-rw-r--r--llvm/lib/Analysis/DataStructure/EquivClassGraphs.cpp21
1 files changed, 9 insertions, 12 deletions
diff --git a/llvm/lib/Analysis/DataStructure/EquivClassGraphs.cpp b/llvm/lib/Analysis/DataStructure/EquivClassGraphs.cpp
index bc8f6a6b8c5..daefb673cbc 100644
--- a/llvm/lib/Analysis/DataStructure/EquivClassGraphs.cpp
+++ b/llvm/lib/Analysis/DataStructure/EquivClassGraphs.cpp
@@ -45,7 +45,7 @@ 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)
+ if (G.retnodes_begin()->first != I)
continue; // Only check a graph once.
DSGraph::NodeMapTy GlobalsGraphNodeMapping;
@@ -181,9 +181,8 @@ void EquivClassGraphs::buildIndirectFunctionSets(Module &M) {
// Currently, that is just the functions in the same call-graph-SCC as F.
//
DSGraph& funcDSGraph = CBU->getDSGraph(*I->second);
- const DSGraph::ReturnNodesTy &RetNodes = funcDSGraph.getReturnNodes();
- for (DSGraph::ReturnNodesTy::const_iterator RI=RetNodes.begin(),
- RE=RetNodes.end(); RI != RE; ++RI)
+ for (DSGraph::retnodes_iterator RI = funcDSGraph.retnodes_begin(),
+ RE = funcDSGraph.retnodes_end(); RI != RE; ++RI)
FuncECs.unionSetsWith(FirstFunc, RI->first);
}
@@ -235,10 +234,8 @@ void EquivClassGraphs::buildIndirectFunctionSets(Module &M) {
continue;
// Record the "folded" graph for the function.
- for (DSGraph::ReturnNodesTy::iterator
- I = CBUGraph.getReturnNodes().begin(),
- E = CBUGraph.getReturnNodes().end();
- I != E; ++I) {
+ for (DSGraph::retnodes_iterator I = CBUGraph.retnodes_begin(),
+ E = CBUGraph.retnodes_end(); I != E; ++I) {
assert(DSInfo[I->first] == 0 && "Graph already exists for Fn!");
DSInfo[I->first] = &MergedG;
}
@@ -284,8 +281,8 @@ DSGraph &EquivClassGraphs::getOrCreateGraph(Function &F) {
Graph->setPrintAuxCalls();
// Make sure to update the DSInfo map for all functions in the graph!
- for (DSGraph::ReturnNodesTy::iterator I = Graph->getReturnNodes().begin();
- I != Graph->getReturnNodes().end(); ++I)
+ for (DSGraph::retnodes_iterator I = Graph->retnodes_begin();
+ I != Graph->retnodes_end(); ++I)
if (I->first != &F) {
DSGraph *&FG = DSInfo[I->first];
assert(FG == 0 && "Merging function in SCC twice?");
@@ -342,8 +339,8 @@ processSCC(DSGraph &FG, std::vector<DSGraph*> &Stack, unsigned &NextID,
FG.cloneInto(*NG, FG.getScalarMap(), FG.getReturnNodes(), NodeMap);
// Update the DSInfo map and delete the old graph...
- for (DSGraph::ReturnNodesTy::iterator I = NG->getReturnNodes().begin();
- I != NG->getReturnNodes().end(); ++I)
+ for (DSGraph::retnodes_iterator I = NG->retnodes_begin();
+ I != NG->retnodes_end(); ++I)
DSInfo[I->first] = &FG;
// Remove NG from the ValMap since the pointer may get recycled.
OpenPOWER on IntegriCloud