[llvm-commits] [llvm] r80718 - /llvm/trunk/lib/Analysis/IPA/CallGraphSCCPass.cpp
Chris Lattner
sabre at nondot.org
Tue Sep 1 13:33:43 PDT 2009
Author: lattner
Date: Tue Sep 1 15:33:43 2009
New Revision: 80718
URL: http://llvm.org/viewvc/llvm-project?rev=80718&view=rev
Log:
Fix a regression I introduced in r80708, found by llvm-test.
Modified:
llvm/trunk/lib/Analysis/IPA/CallGraphSCCPass.cpp
Modified: llvm/trunk/lib/Analysis/IPA/CallGraphSCCPass.cpp
URL: http://llvm.org/viewvc/llvm-project/llvm/trunk/lib/Analysis/IPA/CallGraphSCCPass.cpp?rev=80718&r1=80717&r2=80718&view=diff
==============================================================================
--- llvm/trunk/lib/Analysis/IPA/CallGraphSCCPass.cpp (original)
+++ llvm/trunk/lib/Analysis/IPA/CallGraphSCCPass.cpp Tue Sep 1 15:33:43 2009
@@ -94,10 +94,10 @@
RefreshCallGraph(CurSCC, CG, false);
CallGraphUpToDate = true;
}
-
- StartPassTimer(P);
+
+ StartPassTimer(CGSP);
Changed = CGSP->runOnSCC(CurSCC);
- StopPassTimer(P);
+ StopPassTimer(CGSP);
// After the CGSCCPass is done, when assertions are enabled, use
// RefreshCallGraph to verify that the callgraph was correctly updated.
@@ -227,8 +227,15 @@
CalleeNode = CG.getOrInsertFunction(Callee);
else
CalleeNode = CG.getCallsExternalNode();
-
- ExistingIt->second = CalleeNode;
+
+ // Update the edge target in CGN.
+ for (CallGraphNode::iterator I = CGN->begin(); ; ++I) {
+ assert(I != CGN->end() && "Didn't find call entry");
+ if (I->first == CS.getInstruction()) {
+ I->second = CalleeNode;
+ break;
+ }
+ }
MadeChange = true;
continue;
}
More information about the llvm-commits
mailing list