diff options
author | Chris Lattner <sabre@nondot.org> | 2003-02-09 18:41:49 +0000 |
---|---|---|
committer | Chris Lattner <sabre@nondot.org> | 2003-02-09 18:41:49 +0000 |
commit | 0eee7eb390589f81274cc17e1950b08afc57ad46 (patch) | |
tree | 56d5090c0205db03a8d8d9c434e867bad0410f6a /llvm/lib/Analysis/DataStructure/DataStructure.cpp | |
parent | ed8dbc90a5d9c0a472b5faf040d5d3fd668ce66d (diff) | |
download | bcm5719-llvm-0eee7eb390589f81274cc17e1950b08afc57ad46.tar.gz bcm5719-llvm-0eee7eb390589f81274cc17e1950b08afc57ad46.zip |
* Fix a bug where global incompleteness marking would not mark the global
itself incomplete!
* Allow incompleteness callers to specify they don't want globals to be
considered sources of incompleteness.
llvm-svn: 5513
Diffstat (limited to 'llvm/lib/Analysis/DataStructure/DataStructure.cpp')
-rw-r--r-- | llvm/lib/Analysis/DataStructure/DataStructure.cpp | 13 |
1 files changed, 5 insertions, 8 deletions
diff --git a/llvm/lib/Analysis/DataStructure/DataStructure.cpp b/llvm/lib/Analysis/DataStructure/DataStructure.cpp index bf487d85d76..30ce4f9baf6 100644 --- a/llvm/lib/Analysis/DataStructure/DataStructure.cpp +++ b/llvm/lib/Analysis/DataStructure/DataStructure.cpp @@ -766,14 +766,11 @@ void DSGraph::markIncompleteNodes(unsigned Flags) { 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) - if (Nodes[i]->NodeType & DSNode::GlobalNode) { - DSNode *N = Nodes[i]; - for (unsigned i = 0, e = N->getSize(); i < e; i += DS::PointerSize) - if (DSNode *DSN = N->getLink(i).getNode()) - markIncompleteNode(DSN); - } + // Mark all global nodes as incomplete... + if ((Flags & DSGraph::IgnoreGlobals) == 0) + for (unsigned i = 0, e = Nodes.size(); i != e; ++i) + if (Nodes[i]->NodeType & DSNode::GlobalNode) + markIncompleteNode(Nodes[i]); } static inline void killIfUselessEdge(DSNodeHandle &Edge) { |