mirror of
https://github.com/c64scene-ar/llvm-6502.git
synced 2025-08-09 11:25:55 +00:00
Mark stuff reachable by _AUX_ calls as incomplete in the BU graph
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@4690 91177308-0d34-0410-b5e6-96231b3b80d8
This commit is contained in:
@@ -716,6 +716,14 @@ static void markIncompleteNode(DSNode *N) {
|
|||||||
markIncompleteNode(DSN);
|
markIncompleteNode(DSN);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
static void markIncomplete(DSCallSite &Call) {
|
||||||
|
// Then the return value is certainly incomplete!
|
||||||
|
markIncompleteNode(Call.getRetVal().getNode());
|
||||||
|
|
||||||
|
// All objects pointed to by function arguments are incomplete!
|
||||||
|
for (unsigned i = 0, e = Call.getNumPtrArgs(); i != e; ++i)
|
||||||
|
markIncompleteNode(Call.getPtrArg(i).getNode());
|
||||||
|
}
|
||||||
|
|
||||||
// markIncompleteNodes - Traverse the graph, identifying nodes that may be
|
// markIncompleteNodes - Traverse the graph, identifying nodes that may be
|
||||||
// modified by other functions that have not been resolved yet. This marks
|
// modified by other functions that have not been resolved yet. This marks
|
||||||
@@ -735,15 +743,13 @@ void DSGraph::markIncompleteNodes(bool markFormalArgs) {
|
|||||||
markIncompleteNode(ScalarMap[I].getNode());
|
markIncompleteNode(ScalarMap[I].getNode());
|
||||||
|
|
||||||
// Mark stuff passed into functions calls as being incomplete...
|
// Mark stuff passed into functions calls as being incomplete...
|
||||||
for (unsigned i = 0, e = FunctionCalls.size(); i != e; ++i) {
|
if (!shouldPrintAuxCalls())
|
||||||
DSCallSite &Call = FunctionCalls[i];
|
for (unsigned i = 0, e = FunctionCalls.size(); i != e; ++i)
|
||||||
// Then the return value is certainly incomplete!
|
markIncomplete(FunctionCalls[i]);
|
||||||
markIncompleteNode(Call.getRetVal().getNode());
|
else
|
||||||
|
for (unsigned i = 0, e = AuxFunctionCalls.size(); i != e; ++i)
|
||||||
|
markIncomplete(AuxFunctionCalls[i]);
|
||||||
|
|
||||||
// All objects pointed to by function arguments are incomplete!
|
|
||||||
for (unsigned i = 0, e = Call.getNumPtrArgs(); i != e; ++i)
|
|
||||||
markIncompleteNode(Call.getPtrArg(i).getNode());
|
|
||||||
}
|
|
||||||
|
|
||||||
// Mark all of the nodes pointed to by global nodes as incomplete...
|
// Mark all of the nodes pointed to by global nodes as incomplete...
|
||||||
for (unsigned i = 0, e = Nodes.size(); i != e; ++i)
|
for (unsigned i = 0, e = Nodes.size(); i != e; ++i)
|
||||||
|
Reference in New Issue
Block a user