aboutsummaryrefslogtreecommitdiff
path: root/lib/Analysis/DataStructure/EquivClassGraphs.cpp
diff options
context:
space:
mode:
authorChris Lattner <sabre@nondot.org>2005-01-30 23:51:25 +0000
committerChris Lattner <sabre@nondot.org>2005-01-30 23:51:25 +0000
commit6538f42208e0edb4fd5344573f82d1cf59bb465d (patch)
tree471fd3731aba61b65bcd3682fece4e81245e9a3e /lib/Analysis/DataStructure/EquivClassGraphs.cpp
parenta9548d9fd99beea7d5e4dc6619cb5569b54620c0 (diff)
Make things more const-correct, adjust to changes in DSA interfaces.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@19940 91177308-0d34-0410-b5e6-96231b3b80d8
Diffstat (limited to 'lib/Analysis/DataStructure/EquivClassGraphs.cpp')
-rw-r--r--lib/Analysis/DataStructure/EquivClassGraphs.cpp13
1 files changed, 8 insertions, 5 deletions
diff --git a/lib/Analysis/DataStructure/EquivClassGraphs.cpp b/lib/Analysis/DataStructure/EquivClassGraphs.cpp
index 136d1ef769..43aa6bf861 100644
--- a/lib/Analysis/DataStructure/EquivClassGraphs.cpp
+++ b/lib/Analysis/DataStructure/EquivClassGraphs.cpp
@@ -292,8 +292,8 @@ processSCC(DSGraph &FG, std::vector<DSGraph*> &Stack, unsigned &NextID,
Stack.push_back(&FG);
// The edges out of the current node are the call site targets...
- for (unsigned i = 0, e = FG.getFunctionCalls().size(); i != e; ++i) {
- Instruction *Call = FG.getFunctionCalls()[i].getCallSite().getInstruction();
+ for (DSGraph::fc_iterator CI = FG.fc_begin(), E = FG.fc_end(); CI != E; ++CI){
+ Instruction *Call = CI->getCallSite().getInstruction();
// Loop over all of the actually called functions...
ActualCalleesTy::const_iterator I, E;
@@ -355,8 +355,10 @@ void PA::EquivClassGraphs::processGraph(DSGraph &G) {
// Else we need to inline some callee graph. Visit all call sites.
// The edges out of the current node are the call site targets...
- for (unsigned i=0, e = G.getFunctionCalls().size(); i != e; ++i) {
- const DSCallSite &CS = G.getFunctionCalls()[i];
+ unsigned i = 0;
+ for (DSGraph::fc_iterator CI = G.fc_begin(), E = G.fc_end(); CI != E;
+ ++CI, ++i) {
+ const DSCallSite &CS = *CI;
Instruction *TheCall = CS.getCallSite().getInstruction();
assert(calls.insert(TheCall).second &&
@@ -392,7 +394,8 @@ void PA::EquivClassGraphs::processGraph(DSGraph &G) {
DSGraph::KeepModRefBits | DSGraph::StripAllocaBit |
DSGraph::DontCloneCallNodes |
DSGraph::DontCloneAuxCallNodes);
- DEBUG(std::cerr << " Inlining graph [" << i << "/" << e-1
+ DEBUG(std::cerr << " Inlining graph [" << i << "/"
+ << G.getFunctionCalls().size()-1
<< ":" << TNum << "/" << Num-1 << "] for "
<< CalleeFunc->getName() << "["
<< CalleeGraph->getGraphSize() << "+"