[llvm-commits] CVS: llvm/lib/Analysis/DataStructure/TopDownClosure.cpp
Chris Lattner
lattner at cs.uiuc.edu
Tue Jan 27 21:08:01 PST 2004
Changes in directory llvm/lib/Analysis/DataStructure:
TopDownClosure.cpp updated: 1.62 -> 1.63
---
Log message:
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!
---
Diffs of the changes: (+2 -3)
Index: llvm/lib/Analysis/DataStructure/TopDownClosure.cpp
diff -u llvm/lib/Analysis/DataStructure/TopDownClosure.cpp:1.62 llvm/lib/Analysis/DataStructure/TopDownClosure.cpp:1.63
--- llvm/lib/Analysis/DataStructure/TopDownClosure.cpp:1.62 Tue Jan 27 15:53:14 2004
+++ llvm/lib/Analysis/DataStructure/TopDownClosure.cpp Tue Jan 27 21:07:30 2004
@@ -62,10 +62,9 @@
// 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
More information about the llvm-commits
mailing list