Fix a bug where we would incorrectly delete globals which had edges to alive nodes in

a graph in the t-d pass.  This slows down the TD pass by quite a bit (1/3), but is
needed for correctness.

llvm-svn: 5464
This commit is contained in:
Chris Lattner 2003-02-01 06:51:17 +00:00
parent c154bdcd4c
commit 5965bbb02f
1 changed files with 0 additions and 3 deletions

View File

@ -973,9 +973,6 @@ static bool CanReachAliveNodes(DSNode *N, hash_set<DSNode*> &Alive,
if (Visited.count(N)) return false; // Found a cycle
Visited.insert(N); // No recursion, insert into Visited...
if (N->NodeType & DSNode::GlobalNode)
return false; // Global nodes will be marked on their own
for (unsigned i = 0, e = N->getSize(); i < e; i += DS::PointerSize)
if (CanReachAliveNodes(N->getLink(i).getNode(), Alive, Visited)) {
N->markReachableNodes(Alive);