summaryrefslogtreecommitdiffstats
path: root/llvm/lib/Analysis/DataStructure
diff options
context:
space:
mode:
authorChris Lattner <sabre@nondot.org>2005-03-22 00:04:21 +0000
committerChris Lattner <sabre@nondot.org>2005-03-22 00:04:21 +0000
commit5f10e6dda17e1cc1d8afd2313459ee7eec747dc0 (patch)
tree99e9c34b8361320ca884a4c861a461643335bad6 /llvm/lib/Analysis/DataStructure
parent848ef879c5d129b81a5eeaccc27035ae038bd939 (diff)
downloadbcm5719-llvm-5f10e6dda17e1cc1d8afd2313459ee7eec747dc0.tar.gz
bcm5719-llvm-5f10e6dda17e1cc1d8afd2313459ee7eec747dc0.zip
don't generate temporary scalarmaps.
llvm-svn: 20749
Diffstat (limited to 'llvm/lib/Analysis/DataStructure')
-rw-r--r--llvm/lib/Analysis/DataStructure/Steensgaard.cpp22
1 files changed, 5 insertions, 17 deletions
diff --git a/llvm/lib/Analysis/DataStructure/Steensgaard.cpp b/llvm/lib/Analysis/DataStructure/Steensgaard.cpp
index 5105f5638f7..d6740277815 100644
--- a/llvm/lib/Analysis/DataStructure/Steensgaard.cpp
+++ b/llvm/lib/Analysis/DataStructure/Steensgaard.cpp
@@ -127,27 +127,15 @@ bool Steens::runOnModule(Module &M) {
// 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
OpenPOWER on IntegriCloud