[llvm-commits] CVS: llvm/lib/Analysis/DataStructure/BottomUpClosure.cpp CompleteBottomUp.cpp DataStructure.cpp EquivClassGraphs.cpp Steensgaard.cpp
Chris Lattner
lattner at cs.uiuc.edu
Mon Mar 21 16:29:57 PST 2005
Changes in directory llvm/lib/Analysis/DataStructure:
BottomUpClosure.cpp updated: 1.103 -> 1.104
CompleteBottomUp.cpp updated: 1.26 -> 1.27
DataStructure.cpp updated: 1.222 -> 1.223
EquivClassGraphs.cpp updated: 1.37 -> 1.38
Steensgaard.cpp updated: 1.52 -> 1.53
---
Log message:
now that the second argument is always this->ReturnNodes, don't bother passing it.
---
Diffs of the changes: (+18 -16)
BottomUpClosure.cpp | 4 ++--
CompleteBottomUp.cpp | 6 ++++--
DataStructure.cpp | 13 ++++++-------
EquivClassGraphs.cpp | 8 +++++---
Steensgaard.cpp | 3 +--
5 files changed, 18 insertions(+), 16 deletions(-)
Index: llvm/lib/Analysis/DataStructure/BottomUpClosure.cpp
diff -u llvm/lib/Analysis/DataStructure/BottomUpClosure.cpp:1.103 llvm/lib/Analysis/DataStructure/BottomUpClosure.cpp:1.104
--- llvm/lib/Analysis/DataStructure/BottomUpClosure.cpp:1.103 Mon Mar 21 18:21:05 2005
+++ llvm/lib/Analysis/DataStructure/BottomUpClosure.cpp Mon Mar 21 18:29:44 2005
@@ -269,7 +269,7 @@
if (&G != SCCGraph) {
{
DSGraph::NodeMapTy NodeMap;
- SCCGraph->cloneInto(G, SCCGraph->getReturnNodes(), NodeMap);
+ SCCGraph->cloneInto(G, NodeMap);
}
// Update the DSInfo map and delete the old graph...
for (DSGraph::retnodes_iterator I = G.retnodes_begin(),
@@ -413,7 +413,7 @@
// bother merging it in again.
if (!GI->containsFunction(*I)) {
DSGraph::NodeMapTy NodeMap;
- GI->cloneInto(getDSGraph(**I), GI->getReturnNodes(), NodeMap);
+ GI->cloneInto(getDSGraph(**I), NodeMap);
++NumBUInlines;
}
Index: llvm/lib/Analysis/DataStructure/CompleteBottomUp.cpp
diff -u llvm/lib/Analysis/DataStructure/CompleteBottomUp.cpp:1.26 llvm/lib/Analysis/DataStructure/CompleteBottomUp.cpp:1.27
--- llvm/lib/Analysis/DataStructure/CompleteBottomUp.cpp:1.26 Mon Mar 21 18:21:05 2005
+++ llvm/lib/Analysis/DataStructure/CompleteBottomUp.cpp Mon Mar 21 18:29:44 2005
@@ -175,8 +175,10 @@
DSGraph *NG = Stack.back();
ValMap[NG] = ~0U;
- DSGraph::NodeMapTy NodeMap;
- FG.cloneInto(*NG, FG.getReturnNodes(), NodeMap);
+ {
+ DSGraph::NodeMapTy NodeMap;
+ FG.cloneInto(*NG, NodeMap);
+ }
// Update the DSInfo map and delete the old graph...
for (DSGraph::retnodes_iterator I = NG->retnodes_begin();
Index: llvm/lib/Analysis/DataStructure/DataStructure.cpp
diff -u llvm/lib/Analysis/DataStructure/DataStructure.cpp:1.222 llvm/lib/Analysis/DataStructure/DataStructure.cpp:1.223
--- llvm/lib/Analysis/DataStructure/DataStructure.cpp:1.222 Mon Mar 21 18:22:45 2005
+++ llvm/lib/Analysis/DataStructure/DataStructure.cpp Mon Mar 21 18:29:44 2005
@@ -1169,14 +1169,14 @@
: GlobalsGraph(0), ScalarMap(ECs), TD(G.TD) {
PrintAuxCalls = false;
NodeMapTy NodeMap;
- cloneInto(G, ReturnNodes, NodeMap, CloneFlags);
+ cloneInto(G, NodeMap, CloneFlags);
}
DSGraph::DSGraph(const DSGraph &G, NodeMapTy &NodeMap,
EquivalenceClasses<GlobalValue*> &ECs)
: GlobalsGraph(0), ScalarMap(ECs), TD(G.TD) {
PrintAuxCalls = false;
- cloneInto(G, ReturnNodes, NodeMap);
+ cloneInto(G, NodeMap);
}
DSGraph::~DSGraph() {
@@ -1242,8 +1242,7 @@
///
/// The CloneFlags member controls various aspects of the cloning process.
///
-void DSGraph::cloneInto(const DSGraph &G,
- ReturnNodesTy &OldReturnNodes, NodeMapTy &OldNodeMap,
+void DSGraph::cloneInto(const DSGraph &G, NodeMapTy &OldNodeMap,
unsigned CloneFlags) {
TIME_REGION(X, "cloneInto");
assert(OldNodeMap.empty() && "Returned OldNodeMap should be empty!");
@@ -1306,9 +1305,9 @@
const DSNodeHandle &Ret = I->second;
DSNodeHandle &MappedRet = OldNodeMap[Ret.getNode()];
DSNode *MappedRetN = MappedRet.getNode();
- OldReturnNodes.insert(std::make_pair(I->first,
- DSNodeHandle(MappedRetN,
- MappedRet.getOffset()+Ret.getOffset())));
+ ReturnNodes.insert(std::make_pair(I->first,
+ DSNodeHandle(MappedRetN,
+ MappedRet.getOffset()+Ret.getOffset())));
}
}
Index: llvm/lib/Analysis/DataStructure/EquivClassGraphs.cpp
diff -u llvm/lib/Analysis/DataStructure/EquivClassGraphs.cpp:1.37 llvm/lib/Analysis/DataStructure/EquivClassGraphs.cpp:1.38
--- llvm/lib/Analysis/DataStructure/EquivClassGraphs.cpp:1.37 Mon Mar 21 18:21:05 2005
+++ llvm/lib/Analysis/DataStructure/EquivClassGraphs.cpp Mon Mar 21 18:29:44 2005
@@ -271,7 +271,7 @@
// Clone this member of the equivalence class into MergedG.
DSGraph::NodeMapTy NodeMap;
- MergedG.cloneInto(CBUGraph, MergedG.getReturnNodes(), NodeMap, 0);
+ MergedG.cloneInto(CBUGraph, NodeMap);
}
// Merge the return nodes of all functions together.
@@ -362,8 +362,10 @@
// 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.getReturnNodes(), NodeMap);
+ {
+ DSGraph::NodeMapTy NodeMap;
+ FG.cloneInto(*NG, NodeMap);
+ }
// Update the DSInfo map and delete the old graph...
for (DSGraph::retnodes_iterator I = NG->retnodes_begin();
Index: llvm/lib/Analysis/DataStructure/Steensgaard.cpp
diff -u llvm/lib/Analysis/DataStructure/Steensgaard.cpp:1.52 llvm/lib/Analysis/DataStructure/Steensgaard.cpp:1.53
--- llvm/lib/Analysis/DataStructure/Steensgaard.cpp:1.52 Mon Mar 21 18:25:52 2005
+++ llvm/lib/Analysis/DataStructure/Steensgaard.cpp Mon Mar 21 18:29:44 2005
@@ -125,8 +125,7 @@
for (Module::iterator I = M.begin(), E = M.end(); I != E; ++I)
if (!I->isExternal()) {
DSGraph::NodeMapTy NodeMap;
- ResultGraph->cloneInto(LDS.getDSGraph(*I), ResultGraph->getReturnNodes(),
- NodeMap, 0);
+ ResultGraph->cloneInto(LDS.getDSGraph(*I), NodeMap, 0);
}
ResultGraph->removeTriviallyDeadNodes();
More information about the llvm-commits
mailing list