[llvm-commits] CVS: llvm/lib/Analysis/DataStructure/Steensgaard.cpp
Chris Lattner
lattner at cs.uiuc.edu
Mon Mar 21 16:26:05 PST 2005
Changes in directory llvm/lib/Analysis/DataStructure:
Steensgaard.cpp updated: 1.51 -> 1.52
---
Log message:
instead of using a local RetValMap, just use the graph we are cloning into
for the return node map.
---
Diffs of the changes: (+5 -8)
Steensgaard.cpp | 13 +++++--------
1 files changed, 5 insertions(+), 8 deletions(-)
Index: llvm/lib/Analysis/DataStructure/Steensgaard.cpp
diff -u llvm/lib/Analysis/DataStructure/Steensgaard.cpp:1.51 llvm/lib/Analysis/DataStructure/Steensgaard.cpp:1.52
--- llvm/lib/Analysis/DataStructure/Steensgaard.cpp:1.51 Mon Mar 21 18:21:05 2005
+++ llvm/lib/Analysis/DataStructure/Steensgaard.cpp Mon Mar 21 18:25:52 2005
@@ -119,18 +119,14 @@
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 @@
// 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 @@
}
}
- 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...
More information about the llvm-commits
mailing list