aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorChris Lattner <sabre@nondot.org>2005-03-22 00:21:05 +0000
committerChris Lattner <sabre@nondot.org>2005-03-22 00:21:05 +0000
commit3c920fa861543355b656446214fa0c4edb06448a (patch)
tree4789818d6a91d59cbcedbfcee75e2576a322e163
parent077531385e0145b3657173de0939e9b4b360538d (diff)
downloadexternal_llvm-3c920fa861543355b656446214fa0c4edb06448a.zip
external_llvm-3c920fa861543355b656446214fa0c4edb06448a.tar.gz
external_llvm-3c920fa861543355b656446214fa0c4edb06448a.tar.bz2
remove the second argument to cloneInto
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@20754 91177308-0d34-0410-b5e6-96231b3b80d8
-rw-r--r--lib/Analysis/DataStructure/BottomUpClosure.cpp6
-rw-r--r--lib/Analysis/DataStructure/CompleteBottomUp.cpp2
-rw-r--r--lib/Analysis/DataStructure/DataStructure.cpp13
-rw-r--r--lib/Analysis/DataStructure/EquivClassGraphs.cpp9
-rw-r--r--lib/Analysis/DataStructure/Steensgaard.cpp3
5 files changed, 14 insertions, 19 deletions
diff --git a/lib/Analysis/DataStructure/BottomUpClosure.cpp b/lib/Analysis/DataStructure/BottomUpClosure.cpp
index 5549c8a..2dae943 100644
--- a/lib/Analysis/DataStructure/BottomUpClosure.cpp
+++ b/lib/Analysis/DataStructure/BottomUpClosure.cpp
@@ -269,8 +269,7 @@ unsigned BUDataStructures::calculateGraphs(Function *F,
if (&G != SCCGraph) {
{
DSGraph::NodeMapTy NodeMap;
- SCCGraph->cloneInto(G, SCCGraph->getScalarMap(),
- SCCGraph->getReturnNodes(), NodeMap);
+ SCCGraph->cloneInto(G, SCCGraph->getReturnNodes(), NodeMap);
}
// Update the DSInfo map and delete the old graph...
for (DSGraph::retnodes_iterator I = G.retnodes_begin(),
@@ -414,8 +413,7 @@ void BUDataStructures::calculateGraph(DSGraph &Graph) {
// bother merging it in again.
if (!GI->containsFunction(*I)) {
DSGraph::NodeMapTy NodeMap;
- GI->cloneInto(getDSGraph(**I), GI->getScalarMap(),
- GI->getReturnNodes(), NodeMap);
+ GI->cloneInto(getDSGraph(**I), GI->getReturnNodes(), NodeMap);
++NumBUInlines;
}
diff --git a/lib/Analysis/DataStructure/CompleteBottomUp.cpp b/lib/Analysis/DataStructure/CompleteBottomUp.cpp
index 6f3a7c2..bc8e04c 100644
--- a/lib/Analysis/DataStructure/CompleteBottomUp.cpp
+++ b/lib/Analysis/DataStructure/CompleteBottomUp.cpp
@@ -176,7 +176,7 @@ unsigned CompleteBUDataStructures::calculateSCCGraphs(DSGraph &FG,
ValMap[NG] = ~0U;
DSGraph::NodeMapTy NodeMap;
- FG.cloneInto(*NG, FG.getScalarMap(), FG.getReturnNodes(), NodeMap);
+ FG.cloneInto(*NG, FG.getReturnNodes(), NodeMap);
// Update the DSInfo map and delete the old graph...
for (DSGraph::retnodes_iterator I = NG->retnodes_begin();
diff --git a/lib/Analysis/DataStructure/DataStructure.cpp b/lib/Analysis/DataStructure/DataStructure.cpp
index e2edb1c..d91acfb 100644
--- a/lib/Analysis/DataStructure/DataStructure.cpp
+++ b/lib/Analysis/DataStructure/DataStructure.cpp
@@ -1169,14 +1169,14 @@ DSGraph::DSGraph(const DSGraph &G, EquivalenceClasses<GlobalValue*> &ECs,
: GlobalsGraph(0), ScalarMap(ECs), TD(G.TD) {
PrintAuxCalls = false;
NodeMapTy NodeMap;
- cloneInto(G, ScalarMap, ReturnNodes, NodeMap, CloneFlags);
+ cloneInto(G, ReturnNodes, NodeMap, CloneFlags);
}
DSGraph::DSGraph(const DSGraph &G, NodeMapTy &NodeMap,
EquivalenceClasses<GlobalValue*> &ECs)
: GlobalsGraph(0), ScalarMap(ECs), TD(G.TD) {
PrintAuxCalls = false;
- cloneInto(G, ScalarMap, ReturnNodes, NodeMap);
+ cloneInto(G, ReturnNodes, NodeMap);
}
DSGraph::~DSGraph() {
@@ -1236,12 +1236,13 @@ DSNode *DSGraph::addObjectToGraph(Value *Ptr, bool UseDeclaredType) {
/// cloneInto - Clone the specified DSGraph into the current graph. The
-/// translated ScalarMap for the old function is filled into the OldValMap
-/// member, and the translated ReturnNodes map is returned into ReturnNodes.
+/// translated ScalarMap for the old function is filled into the ScalarMap
+/// for the graph, and the translated ReturnNodes map is returned into
+/// ReturnNodes.
///
/// The CloneFlags member controls various aspects of the cloning process.
///
-void DSGraph::cloneInto(const DSGraph &G, DSScalarMap &OldValMap,
+void DSGraph::cloneInto(const DSGraph &G,
ReturnNodesTy &OldReturnNodes, NodeMapTy &OldNodeMap,
unsigned CloneFlags) {
TIME_REGION(X, "cloneInto");
@@ -1281,7 +1282,7 @@ void DSGraph::cloneInto(const DSGraph &G, DSScalarMap &OldValMap,
for (DSScalarMap::const_iterator I = G.ScalarMap.begin(),
E = G.ScalarMap.end(); I != E; ++I) {
DSNodeHandle &MappedNode = OldNodeMap[I->second.getNode()];
- DSNodeHandle &H = OldValMap[I->first];
+ DSNodeHandle &H = ScalarMap[I->first];
DSNode *MappedNodeN = MappedNode.getNode();
H.mergeWith(DSNodeHandle(MappedNodeN,
I->second.getOffset()+MappedNode.getOffset()));
diff --git a/lib/Analysis/DataStructure/EquivClassGraphs.cpp b/lib/Analysis/DataStructure/EquivClassGraphs.cpp
index a562191..83b9d9a 100644
--- a/lib/Analysis/DataStructure/EquivClassGraphs.cpp
+++ b/lib/Analysis/DataStructure/EquivClassGraphs.cpp
@@ -270,11 +270,8 @@ void EquivClassGraphs::buildIndirectFunctionSets(Module &M) {
}
// Clone this member of the equivalence class into MergedG.
- {
- DSGraph::NodeMapTy NodeMap;
- MergedG.cloneInto(CBUGraph, MergedG.getScalarMap(),
- MergedG.getReturnNodes(), NodeMap, 0);
- }
+ DSGraph::NodeMapTy NodeMap;
+ MergedG.cloneInto(CBUGraph, MergedG.getReturnNodes(), NodeMap, 0);
}
// Merge the return nodes of all functions together.
@@ -366,7 +363,7 @@ processSCC(DSGraph &FG, std::vector<DSGraph*> &Stack, unsigned &NextID,
// If the SCC found is not the same as those found in CBU, make sure to
// merge the graphs as appropriate.
DSGraph::NodeMapTy NodeMap;
- FG.cloneInto(*NG, FG.getScalarMap(), FG.getReturnNodes(), NodeMap);
+ FG.cloneInto(*NG, FG.getReturnNodes(), NodeMap);
// Update the DSInfo map and delete the old graph...
for (DSGraph::retnodes_iterator I = NG->retnodes_begin();
diff --git a/lib/Analysis/DataStructure/Steensgaard.cpp b/lib/Analysis/DataStructure/Steensgaard.cpp
index d674027..45637ff 100644
--- a/lib/Analysis/DataStructure/Steensgaard.cpp
+++ b/lib/Analysis/DataStructure/Steensgaard.cpp
@@ -130,8 +130,7 @@ bool Steens::runOnModule(Module &M) {
for (Module::iterator I = M.begin(), E = M.end(); I != E; ++I)
if (!I->isExternal()) {
DSGraph::NodeMapTy NodeMap;
- ResultGraph->cloneInto(LDS.getDSGraph(*I), ResultGraph->getScalarMap(),
- RetValMap, NodeMap, 0);
+ ResultGraph->cloneInto(LDS.getDSGraph(*I), RetValMap, NodeMap, 0);
}
ResultGraph->removeTriviallyDeadNodes();