diff options
author | Chris Lattner <sabre@nondot.org> | 2002-11-11 03:36:55 +0000 |
---|---|---|
committer | Chris Lattner <sabre@nondot.org> | 2002-11-11 03:36:55 +0000 |
commit | e71ffc291c29ad6ff62d746d57c690d501328b56 (patch) | |
tree | 65d7a732fd32ff856580b8397f4481fdc81dd5e9 /lib/Analysis/DataStructure | |
parent | 8a5db46967f42174730aacebe28c97b484a623f0 (diff) |
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
Diffstat (limited to 'lib/Analysis/DataStructure')
-rw-r--r-- | lib/Analysis/DataStructure/DataStructure.cpp | 24 |
1 files changed, 15 insertions, 9 deletions
diff --git a/lib/Analysis/DataStructure/DataStructure.cpp b/lib/Analysis/DataStructure/DataStructure.cpp index b07a0f7d85..cd92995500 100644 --- a/lib/Analysis/DataStructure/DataStructure.cpp +++ b/lib/Analysis/DataStructure/DataStructure.cpp @@ -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) |