[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:37:04 PST 2005
Changes in directory llvm/lib/Analysis/DataStructure:
BottomUpClosure.cpp updated: 1.104 -> 1.105
CompleteBottomUp.cpp updated: 1.27 -> 1.28
DataStructure.cpp updated: 1.224 -> 1.225
EquivClassGraphs.cpp updated: 1.38 -> 1.39
Steensgaard.cpp updated: 1.53 -> 1.54
---
Log message:
Now that the dead ctor is gone, nothing uses the old node mapping exported by
cloneInto: make it an internally used mapping.
---
Diffs of the changes: (+12 -25)
BottomUpClosure.cpp | 9 +++------
CompleteBottomUp.cpp | 5 +----
DataStructure.cpp | 9 ++++-----
EquivClassGraphs.cpp | 8 ++------
Steensgaard.cpp | 6 ++----
5 files changed, 12 insertions(+), 25 deletions(-)
Index: llvm/lib/Analysis/DataStructure/BottomUpClosure.cpp
diff -u llvm/lib/Analysis/DataStructure/BottomUpClosure.cpp:1.104 llvm/lib/Analysis/DataStructure/BottomUpClosure.cpp:1.105
--- llvm/lib/Analysis/DataStructure/BottomUpClosure.cpp:1.104 Mon Mar 21 18:29:44 2005
+++ llvm/lib/Analysis/DataStructure/BottomUpClosure.cpp Mon Mar 21 18:36:51 2005
@@ -267,10 +267,8 @@
E = SCCGraphs.end(); I != E; ++I) {
DSGraph &G = **I;
if (&G != SCCGraph) {
- {
- DSGraph::NodeMapTy NodeMap;
- SCCGraph->cloneInto(G, NodeMap);
- }
+ SCCGraph->cloneInto(G);
+
// Update the DSInfo map and delete the old graph...
for (DSGraph::retnodes_iterator I = G.retnodes_begin(),
E = G.retnodes_end(); I != E; ++I)
@@ -412,8 +410,7 @@
// If the graph already contains the nodes for the function, don't
// bother merging it in again.
if (!GI->containsFunction(*I)) {
- DSGraph::NodeMapTy NodeMap;
- GI->cloneInto(getDSGraph(**I), NodeMap);
+ GI->cloneInto(getDSGraph(**I));
++NumBUInlines;
}
Index: llvm/lib/Analysis/DataStructure/CompleteBottomUp.cpp
diff -u llvm/lib/Analysis/DataStructure/CompleteBottomUp.cpp:1.27 llvm/lib/Analysis/DataStructure/CompleteBottomUp.cpp:1.28
--- llvm/lib/Analysis/DataStructure/CompleteBottomUp.cpp:1.27 Mon Mar 21 18:29:44 2005
+++ llvm/lib/Analysis/DataStructure/CompleteBottomUp.cpp Mon Mar 21 18:36:51 2005
@@ -175,10 +175,7 @@
DSGraph *NG = Stack.back();
ValMap[NG] = ~0U;
- {
- DSGraph::NodeMapTy NodeMap;
- FG.cloneInto(*NG, NodeMap);
- }
+ FG.cloneInto(*NG);
// 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.224 llvm/lib/Analysis/DataStructure/DataStructure.cpp:1.225
--- llvm/lib/Analysis/DataStructure/DataStructure.cpp:1.224 Mon Mar 21 18:33:35 2005
+++ llvm/lib/Analysis/DataStructure/DataStructure.cpp Mon Mar 21 18:36:51 2005
@@ -1168,8 +1168,7 @@
unsigned CloneFlags)
: GlobalsGraph(0), ScalarMap(ECs), TD(G.TD) {
PrintAuxCalls = false;
- NodeMapTy NodeMap;
- cloneInto(G, NodeMap, CloneFlags);
+ cloneInto(G, CloneFlags);
}
DSGraph::~DSGraph() {
@@ -1235,12 +1234,12 @@
///
/// The CloneFlags member controls various aspects of the cloning process.
///
-void DSGraph::cloneInto(const DSGraph &G, NodeMapTy &OldNodeMap,
- unsigned CloneFlags) {
+void DSGraph::cloneInto(const DSGraph &G, unsigned CloneFlags) {
TIME_REGION(X, "cloneInto");
- assert(OldNodeMap.empty() && "Returned OldNodeMap should be empty!");
assert(&G != this && "Cannot clone graph into itself!");
+ NodeMapTy OldNodeMap;
+
// Remove alloca or mod/ref bits as specified...
unsigned BitsToClear = ((CloneFlags & StripAllocaBit)? DSNode::AllocaNode : 0)
| ((CloneFlags & StripModRefBits)? (DSNode::Modified | DSNode::Read) : 0)
Index: llvm/lib/Analysis/DataStructure/EquivClassGraphs.cpp
diff -u llvm/lib/Analysis/DataStructure/EquivClassGraphs.cpp:1.38 llvm/lib/Analysis/DataStructure/EquivClassGraphs.cpp:1.39
--- llvm/lib/Analysis/DataStructure/EquivClassGraphs.cpp:1.38 Mon Mar 21 18:29:44 2005
+++ llvm/lib/Analysis/DataStructure/EquivClassGraphs.cpp Mon Mar 21 18:36:51 2005
@@ -270,8 +270,7 @@
}
// Clone this member of the equivalence class into MergedG.
- DSGraph::NodeMapTy NodeMap;
- MergedG.cloneInto(CBUGraph, NodeMap);
+ MergedG.cloneInto(CBUGraph);
}
// Merge the return nodes of all functions together.
@@ -362,10 +361,7 @@
// 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, NodeMap);
- }
+ FG.cloneInto(*NG);
// 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.53 llvm/lib/Analysis/DataStructure/Steensgaard.cpp:1.54
--- llvm/lib/Analysis/DataStructure/Steensgaard.cpp:1.53 Mon Mar 21 18:29:44 2005
+++ llvm/lib/Analysis/DataStructure/Steensgaard.cpp Mon Mar 21 18:36:51 2005
@@ -123,10 +123,8 @@
// 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), NodeMap, 0);
- }
+ if (!I->isExternal())
+ ResultGraph->cloneInto(LDS.getDSGraph(*I));
ResultGraph->removeTriviallyDeadNodes();
More information about the llvm-commits
mailing list