[llvm-commits] [poolalloc] r141676 - /poolalloc/trunk/lib/DSA/DataStructure.cpp
John Criswell
criswell at uiuc.edu
Tue Oct 11 09:40:28 PDT 2011
Author: criswell
Date: Tue Oct 11 11:40:27 2011
New Revision: 141676
URL: http://llvm.org/viewvc/llvm-project?rev=141676&view=rev
Log:
Removed dead function CanReachAliveNodes().
Modified:
poolalloc/trunk/lib/DSA/DataStructure.cpp
Modified: poolalloc/trunk/lib/DSA/DataStructure.cpp
URL: http://llvm.org/viewvc/llvm-project/poolalloc/trunk/lib/DSA/DataStructure.cpp?rev=141676&r1=141675&r2=141676&view=diff
==============================================================================
--- poolalloc/trunk/lib/DSA/DataStructure.cpp (original)
+++ poolalloc/trunk/lib/DSA/DataStructure.cpp Tue Oct 11 11:40:27 2011
@@ -1232,37 +1232,6 @@
getPtrArg(i).getNode()->markReachableNodes(Nodes);
}
-// CanReachAliveNodes - Simple graph walker that recursively traverses the graph
-// looking for a node that is marked alive. If an alive node is found, return
-// true, otherwise return false. If an alive node is reachable, this node is
-// marked as alive...
-//
-static bool CanReachAliveNodes(DSNode *N, DenseSet<const DSNode*> &Alive,
- DenseSet<const DSNode*> &Visited,
- bool IgnoreGlobals) {
- if (N == 0) return false;
- assert(N->isForwarding() == 0 && "Cannot mark a forwarded node!");
-
- // If this is a global node, it will end up in the globals graph anyway, so we
- // don't need to worry about it.
- if (IgnoreGlobals && N->isGlobalNode()) return false;
-
- // If we know that this node is alive, return so!
- if (Alive.count(N)) return true;
-
- // Otherwise, we don't think the node is alive yet, check for infinite
- // recursion.
- if (Visited.count(N)) return false; // Found a cycle
- Visited.insert(N); // No recursion, insert into Visited...
-
- for (DSNode::edge_iterator I = N->edge_begin(),E = N->edge_end(); I != E; ++I)
- if (CanReachAliveNodes(I->second.getNode(), Alive, Visited, IgnoreGlobals)) {
- N->markReachableNodes(Alive);
- return true;
- }
- return false;
-}
-
////////////////////////////////////////////////////////////////////////////////
//Base DataStructures impl:
////////////////////////////////////////////////////////////////////////////////
More information about the llvm-commits
mailing list