mirror of
https://github.com/c64scene-ar/llvm-6502.git
synced 2025-06-15 05:24:01 +00:00
Fix testsuite regressions from recursive inlining.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@62189 91177308-0d34-0410-b5e6-96231b3b80d8
This commit is contained in:
@ -150,11 +150,8 @@ static void UpdateCallGraphAfterInlining(CallSite CS,
|
||||
CallGraph &CG) {
|
||||
const Function *Caller = CS.getInstruction()->getParent()->getParent();
|
||||
const Function *Callee = CS.getCalledFunction();
|
||||
|
||||
// Update the call graph by deleting the edge from Callee to Caller
|
||||
CallGraphNode *CalleeNode = CG[Callee];
|
||||
CallGraphNode *CallerNode = CG[Caller];
|
||||
CallerNode->removeCallEdgeFor(CS);
|
||||
|
||||
// Since we inlined some uninlined call sites in the callee into the caller,
|
||||
// add edges from the caller to all of the callees of the callee.
|
||||
@ -171,6 +168,9 @@ static void UpdateCallGraphAfterInlining(CallSite CS,
|
||||
CallerNode->addCalledFunction(CallSite::get(NewCall), I->second);
|
||||
}
|
||||
}
|
||||
// Update the call graph by deleting the edge from Callee to Caller. We must
|
||||
// do this after the loop above in case Caller and Callee are the same.
|
||||
CallerNode->removeCallEdgeFor(CS);
|
||||
}
|
||||
|
||||
|
||||
|
Reference in New Issue
Block a user