summaryrefslogtreecommitdiffstats
path: root/llvm/lib/Analysis/DataStructure/Steensgaard.cpp
diff options
context:
space:
mode:
authorChris Lattner <sabre@nondot.org>2003-06-30 03:15:25 +0000
committerChris Lattner <sabre@nondot.org>2003-06-30 03:15:25 +0000
commit63aeacfe3da3e400d62de8ee3e65fd7602464f48 (patch)
tree6dc4f80688bf5a86d08ca6130245e6abf5bf03c4 /llvm/lib/Analysis/DataStructure/Steensgaard.cpp
parent151576413e9d408a604a5aa46544fe5a67b3efe3 (diff)
downloadbcm5719-llvm-63aeacfe3da3e400d62de8ee3e65fd7602464f48.tar.gz
bcm5719-llvm-63aeacfe3da3e400d62de8ee3e65fd7602464f48.zip
Revamp DSGraphs so that they can support multiple functions in the same
DSGraph at one time llvm-svn: 6994
Diffstat (limited to 'llvm/lib/Analysis/DataStructure/Steensgaard.cpp')
-rw-r--r--llvm/lib/Analysis/DataStructure/Steensgaard.cpp16
1 files changed, 5 insertions, 11 deletions
diff --git a/llvm/lib/Analysis/DataStructure/Steensgaard.cpp b/llvm/lib/Analysis/DataStructure/Steensgaard.cpp
index 2f370258ff7..5db619dd59e 100644
--- a/llvm/lib/Analysis/DataStructure/Steensgaard.cpp
+++ b/llvm/lib/Analysis/DataStructure/Steensgaard.cpp
@@ -111,7 +111,7 @@ bool Steens::run(Module &M) {
// RetValMap - Keep track of the return values for all functions that return
// valid pointers.
//
- hash_map<Function*, DSNodeHandle> RetValMap;
+ DSGraph::ReturnNodesTy RetValMap;
// Loop over the rest of the module, merging graphs for non-external functions
// into this graph.
@@ -119,22 +119,16 @@ bool Steens::run(Module &M) {
unsigned Count = 0;
for (Module::iterator I = M.begin(), E = M.end(); I != E; ++I)
if (!I->isExternal()) {
- hash_map<Value*, DSNodeHandle> ValMap;
+ DSGraph::ScalarMapTy ValMap;
{ // Scope to free NodeMap memory ASAP
- hash_map<const DSNode*, DSNodeHandle> NodeMap;
+ DSGraph::NodeMapTy NodeMap;
const DSGraph &FDSG = LDS.getDSGraph(*I);
- DSNodeHandle RetNode = ResultGraph->cloneInto(FDSG, ValMap, NodeMap);
-
- // Keep track of the return node of the function's graph if it returns a
- // value...
- //
- if (RetNode.getNode())
- RetValMap[I] = RetNode;
+ ResultGraph->cloneInto(FDSG, ValMap, RetValMap, NodeMap);
}
// Incorporate the inlined Function's ScalarMap into the global
// ScalarMap...
- hash_map<Value*, DSNodeHandle> &GVM = ResultGraph->getScalarMap();
+ DSGraph::ScalarMapTy &GVM = ResultGraph->getScalarMap();
for (hash_map<Value*, DSNodeHandle>::iterator I = ValMap.begin(),
E = ValMap.end(); I != E; ++I)
GVM[I->first].mergeWith(I->second);
OpenPOWER on IntegriCloud