mirror of
https://github.com/c64scene-ar/llvm-6502.git
synced 2025-02-01 02:33:44 +00:00
Fix a regression I introduced in r80708, found by llvm-test.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@80718 91177308-0d34-0410-b5e6-96231b3b80d8
This commit is contained in:
parent
0bb83860f9
commit
44a18370e0
@ -94,10 +94,10 @@ bool CGPassManager::RunPassOnSCC(Pass *P, std::vector<CallGraphNode*> &CurSCC,
|
||||
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 @@ void CGPassManager::RefreshCallGraph(std::vector<CallGraphNode*> &CurSCC,
|
||||
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;
|
||||
}
|
||||
|
Loading…
x
Reference in New Issue
Block a user