the globals directly. This doesn't save any substantial time, however, because the
globals graph only contains globals!
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@10997
91177308-0d34-0410-b5e6-
96231b3b80d8
// 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