mirror of
https://github.com/c64scene-ar/llvm-6502.git
synced 2025-02-21 06:30:16 +00:00
Make the BU closure keep track of which actual calls happen
Minor cleanups git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@7059 91177308-0d34-0410-b5e6-96231b3b80d8
This commit is contained in:
parent
3051419036
commit
744f93996e
@ -173,6 +173,9 @@ unsigned BUDataStructures::calculateGraphs(Function *F,
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
// Clean up the graph before we start inlining a bunch again...
|
||||||
|
SCCGraph->removeTriviallyDeadNodes();
|
||||||
|
|
||||||
// Now that we have one big happy family, resolve all of the call sites in
|
// Now that we have one big happy family, resolve all of the call sites in
|
||||||
// the graph...
|
// the graph...
|
||||||
calculateGraph(*SCCGraph);
|
calculateGraph(*SCCGraph);
|
||||||
@ -232,8 +235,7 @@ void BUDataStructures::calculateGraph(DSGraph &Graph) {
|
|||||||
|
|
||||||
// Resolve the current call...
|
// Resolve the current call...
|
||||||
Function *Callee = *I;
|
Function *Callee = *I;
|
||||||
const DSCallSite &CS = I.getCallSite();
|
DSCallSite CS = I.getCallSite();
|
||||||
ActualCallees.insert(std::make_pair(&CS.getCallInst(), Callee));
|
|
||||||
|
|
||||||
if (Callee->isExternal()) {
|
if (Callee->isExternal()) {
|
||||||
// Ignore this case, simple varargs functions we cannot stub out!
|
// Ignore this case, simple varargs functions we cannot stub out!
|
||||||
@ -246,6 +248,8 @@ void BUDataStructures::calculateGraph(DSGraph &Graph) {
|
|||||||
Graph.mergeInGraph(CS, *Callee, Graph, 0);
|
Graph.mergeInGraph(CS, *Callee, Graph, 0);
|
||||||
|
|
||||||
} else {
|
} else {
|
||||||
|
ActualCallees.insert(std::make_pair(&CS.getCallInst(), Callee));
|
||||||
|
|
||||||
// Get the data structure graph for the called function.
|
// Get the data structure graph for the called function.
|
||||||
//
|
//
|
||||||
DSGraph &GI = getDSGraph(*Callee); // Graph to inline
|
DSGraph &GI = getDSGraph(*Callee); // Graph to inline
|
||||||
|
Loading…
x
Reference in New Issue
Block a user