[llvm-commits] CVS: llvm/lib/Analysis/DataStructure/Steensgaard.cpp
Chris Lattner
lattner at cs.uiuc.edu
Mon Mar 21 16:04:37 PST 2005
Changes in directory llvm/lib/Analysis/DataStructure:
Steensgaard.cpp updated: 1.49 -> 1.50
---
Log message:
don't generate temporary scalarmaps.
---
Diffs of the changes: (+5 -17)
Steensgaard.cpp | 22 +++++-----------------
1 files changed, 5 insertions(+), 17 deletions(-)
Index: llvm/lib/Analysis/DataStructure/Steensgaard.cpp
diff -u llvm/lib/Analysis/DataStructure/Steensgaard.cpp:1.49 llvm/lib/Analysis/DataStructure/Steensgaard.cpp:1.50
--- llvm/lib/Analysis/DataStructure/Steensgaard.cpp:1.49 Sat Mar 19 22:23:57 2005
+++ llvm/lib/Analysis/DataStructure/Steensgaard.cpp Mon Mar 21 18:04:21 2005
@@ -127,27 +127,15 @@
// Loop over the rest of the module, merging graphs for non-external functions
// into this graph.
//
- unsigned Count = 0;
for (Module::iterator I = M.begin(), E = M.end(); I != E; ++I)
if (!I->isExternal()) {
- DSGraph::ScalarMapTy ValMap(GlobalECs);
- { // Scope to free NodeMap memory ASAP
- DSGraph::NodeMapTy NodeMap;
- const DSGraph &FDSG = LDS.getDSGraph(*I);
- ResultGraph->cloneInto(FDSG, ValMap, RetValMap, NodeMap, 0);
- }
-
- // Incorporate the inlined Function's ScalarMap into the global
- // ScalarMap...
- DSGraph::ScalarMapTy &GVM = ResultGraph->getScalarMap();
- for (DSGraph::ScalarMapTy::iterator I = ValMap.begin(),
- E = ValMap.end(); I != E; ++I)
- GVM[I->first].mergeWith(I->second);
-
- if ((++Count & 1) == 0) // Prune nodes out every other time...
- ResultGraph->removeTriviallyDeadNodes();
+ DSGraph::NodeMapTy NodeMap;
+ ResultGraph->cloneInto(LDS.getDSGraph(*I), ResultGraph->getScalarMap(),
+ RetValMap, NodeMap, 0);
}
+ ResultGraph->removeTriviallyDeadNodes();
+
// FIXME: Must recalculate and use the Incomplete markers!!
// Now that we have all of the graphs inlined, we can go about eliminating
More information about the llvm-commits
mailing list