1
0
mirror of https://github.com/RPCS3/llvm-mirror.git synced 2024-11-24 19:52:54 +01:00

Mark stuff reachable by _AUX_ calls as incomplete in the BU graph

llvm-svn: 4690
This commit is contained in:
Chris Lattner 2002-11-11 03:36:55 +00:00
parent f05d126a68
commit fb44e1ff28

View File

@ -716,6 +716,14 @@ static void markIncompleteNode(DSNode *N) {
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
// 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());
// Mark stuff passed into functions calls as being incomplete...
for (unsigned i = 0, e = FunctionCalls.size(); i != e; ++i) {
DSCallSite &Call = FunctionCalls[i];
// 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());
}
if (!shouldPrintAuxCalls())
for (unsigned i = 0, e = FunctionCalls.size(); i != e; ++i)
markIncomplete(FunctionCalls[i]);
else
for (unsigned i = 0, e = AuxFunctionCalls.size(); i != e; ++i)
markIncomplete(AuxFunctionCalls[i]);
// Mark all of the nodes pointed to by global nodes as incomplete...
for (unsigned i = 0, e = Nodes.size(); i != e; ++i)