summaryrefslogtreecommitdiffstats
path: root/llvm/lib/Analysis
diff options
context:
space:
mode:
authorChris Lattner <sabre@nondot.org>2004-01-28 03:07:30 +0000
committerChris Lattner <sabre@nondot.org>2004-01-28 03:07:30 +0000
commit461310139ae1a735cf987261083fc9f673cc5cd0 (patch)
tree38c4e2bfa3f0f7cfb6a5c30779d23bfb467efc77 /llvm/lib/Analysis
parent63c649a9fad85e78946d98a22c96853efe22d768 (diff)
downloadbcm5719-llvm-461310139ae1a735cf987261083fc9f673cc5cd0.tar.gz
bcm5719-llvm-461310139ae1a735cf987261083fc9f673cc5cd0.zip
In the TD pass, don't iterate over the scalar map to find the globals, iterate over
the globals directly. This doesn't save any substantial time, however, because the globals graph only contains globals! llvm-svn: 10997
Diffstat (limited to 'llvm/lib/Analysis')
-rw-r--r--llvm/lib/Analysis/DataStructure/TopDownClosure.cpp5
1 files changed, 2 insertions, 3 deletions
diff --git a/llvm/lib/Analysis/DataStructure/TopDownClosure.cpp b/llvm/lib/Analysis/DataStructure/TopDownClosure.cpp
index 01dec2978d1..67ea400dced 100644
--- a/llvm/lib/Analysis/DataStructure/TopDownClosure.cpp
+++ b/llvm/lib/Analysis/DataStructure/TopDownClosure.cpp
@@ -62,10 +62,9 @@ bool TDDataStructures::run(Module &M) {
// globals graph.
const DSGraph::ScalarMapTy &GGSM = GlobalsGraph->getScalarMap();
hash_set<DSNode*> Visited;
- for (DSGraph::ScalarMapTy::const_iterator I = GGSM.begin(), E = GGSM.end();
+ for (DSScalarMap::global_iterator I = GGSM.global_begin(), E = GGSM.global_end();
I != E; ++I)
- if (isa<GlobalValue>(I->first))
- markReachableFunctionsExternallyAccessible(I->second.getNode(), Visited);
+ markReachableFunctionsExternallyAccessible(GGSM.find(*I)->second.getNode(), Visited);
// Loop over unresolved call nodes. Any functions passed into (but not
// returned!) from unresolvable call nodes may be invoked outside of the
OpenPOWER on IntegriCloud