diff options
author | Chris Lattner <sabre@nondot.org> | 2005-03-22 00:25:52 +0000 |
---|---|---|
committer | Chris Lattner <sabre@nondot.org> | 2005-03-22 00:25:52 +0000 |
commit | 560af8aa975cdd27c1e3217e8c633650a796357d (patch) | |
tree | 52b71c362aab6d793a8909b97e98489167d71544 /lib/Analysis/DataStructure/Steensgaard.cpp | |
parent | dc0b71b3bba0def59005b8420d0cf09eb8ef2a01 (diff) |
instead of using a local RetValMap, just use the graph we are cloning into
for the return node map.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@20757 91177308-0d34-0410-b5e6-96231b3b80d8
Diffstat (limited to 'lib/Analysis/DataStructure/Steensgaard.cpp')
-rw-r--r-- | lib/Analysis/DataStructure/Steensgaard.cpp | 13 |
1 files changed, 5 insertions, 8 deletions
diff --git a/lib/Analysis/DataStructure/Steensgaard.cpp b/lib/Analysis/DataStructure/Steensgaard.cpp index 45637ffd73..8c76189b45 100644 --- a/lib/Analysis/DataStructure/Steensgaard.cpp +++ b/lib/Analysis/DataStructure/Steensgaard.cpp @@ -119,18 +119,14 @@ bool Steens::runOnModule(Module &M) { ResultGraph->setGlobalsGraph(GlobalsGraph); ResultGraph->setPrintAuxCalls(); - // RetValMap - Keep track of the return values for all functions that return - // valid pointers. - // - DSGraph::ReturnNodesTy RetValMap; - // Loop over the rest of the module, merging graphs for non-external functions // into this graph. // for (Module::iterator I = M.begin(), E = M.end(); I != E; ++I) if (!I->isExternal()) { DSGraph::NodeMapTy NodeMap; - ResultGraph->cloneInto(LDS.getDSGraph(*I), RetValMap, NodeMap, 0); + ResultGraph->cloneInto(LDS.getDSGraph(*I), ResultGraph->getReturnNodes(), + NodeMap, 0); } ResultGraph->removeTriviallyDeadNodes(); @@ -161,7 +157,7 @@ bool Steens::runOnModule(Module &M) { // If we can eliminate this function call, do so! Function *F = CallTargets[c]; if (!F->isExternal()) { - ResolveFunctionCall(F, CurCall, RetValMap[F]); + ResolveFunctionCall(F, CurCall, ResultGraph->getReturnNodes()[F]); CallTargets[c] = CallTargets.back(); CallTargets.pop_back(); } else @@ -174,7 +170,8 @@ bool Steens::runOnModule(Module &M) { } } - RetValMap.clear(); + // Remove our knowledge of what the return values of the functions are. + ResultGraph->getReturnNodes().clear(); // Update the "incomplete" markers on the nodes, ignoring unknownness due to // incoming arguments... |