diff options
author | Chris Lattner <sabre@nondot.org> | 2005-03-22 00:04:21 +0000 |
---|---|---|
committer | Chris Lattner <sabre@nondot.org> | 2005-03-22 00:04:21 +0000 |
commit | 7080c3e54ea2d56fdf7125e2700dae70161d24b5 (patch) | |
tree | 343d25089311b5378433be54829d6819b81cc75b /lib/Analysis/DataStructure/Steensgaard.cpp | |
parent | f09ecffa0dba325c5ca974908f19b7f24b291777 (diff) |
don't generate temporary scalarmaps.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@20749 91177308-0d34-0410-b5e6-96231b3b80d8
Diffstat (limited to 'lib/Analysis/DataStructure/Steensgaard.cpp')
-rw-r--r-- | lib/Analysis/DataStructure/Steensgaard.cpp | 22 |
1 files changed, 5 insertions, 17 deletions
diff --git a/lib/Analysis/DataStructure/Steensgaard.cpp b/lib/Analysis/DataStructure/Steensgaard.cpp index 5105f5638f..d674027781 100644 --- a/lib/Analysis/DataStructure/Steensgaard.cpp +++ b/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 |