[llvm-commits] CVS: llvm/lib/Analysis/DataStructure/DataStructure.cpp
Chris Lattner
lattner at cs.uiuc.edu
Fri Nov 8 16:28:05 PST 2002
Changes in directory llvm/lib/Analysis/DataStructure:
DataStructure.cpp updated: 1.52 -> 1.53
---
Log message:
Allow specification of whether the call sites should be copied, AND whether
the aux call sites should be copied
---
Diffs of the changes:
Index: llvm/lib/Analysis/DataStructure/DataStructure.cpp
diff -u llvm/lib/Analysis/DataStructure/DataStructure.cpp:1.52 llvm/lib/Analysis/DataStructure/DataStructure.cpp:1.53
--- llvm/lib/Analysis/DataStructure/DataStructure.cpp:1.52 Fri Nov 8 15:27:12 2002
+++ llvm/lib/Analysis/DataStructure/DataStructure.cpp Fri Nov 8 16:27:09 2002
@@ -588,9 +588,11 @@
FunctionCalls.reserve(FC+G.FunctionCalls.size());
for (unsigned i = 0, ei = G.FunctionCalls.size(); i != ei; ++i)
FunctionCalls.push_back(DSCallSite(G.FunctionCalls[i], OldNodeMap));
+ }
+ if (!(CloneFlags & DontCloneAuxCallNodes)) {
// Copy the auxillary function calls list...
- FC = AuxFunctionCalls.size(); // FirstCall
+ unsigned FC = AuxFunctionCalls.size(); // FirstCall
AuxFunctionCalls.reserve(FC+G.AuxFunctionCalls.size());
for (unsigned i = 0, ei = G.AuxFunctionCalls.size(); i != ei; ++i)
AuxFunctionCalls.push_back(DSCallSite(G.AuxFunctionCalls[i], OldNodeMap));
@@ -981,13 +983,20 @@
std::set<DSNode*> Alive;
// If KeepCalls, mark all nodes reachable by call nodes as alive...
- if (KeepCalls)
+ if (KeepCalls) {
for (unsigned i = 0, e = FunctionCalls.size(); i != e; ++i) {
for (unsigned j = 0, e = FunctionCalls[i].getNumPtrArgs(); j != e; ++j)
markAlive(FunctionCalls[i].getPtrArg(j).getNode(), Alive);
markAlive(FunctionCalls[i].getRetVal().getNode(), Alive);
markAlive(FunctionCalls[i].getCallee().getNode(), Alive);
}
+ for (unsigned i = 0, e = AuxFunctionCalls.size(); i != e; ++i) {
+ for (unsigned j = 0, e = AuxFunctionCalls[i].getNumPtrArgs(); j != e; ++j)
+ markAlive(AuxFunctionCalls[i].getPtrArg(j).getNode(), Alive);
+ markAlive(AuxFunctionCalls[i].getRetVal().getNode(), Alive);
+ markAlive(AuxFunctionCalls[i].getCallee().getNode(), Alive);
+ }
+ }
// Mark all nodes reachable by scalar nodes as alive...
for (std::map<Value*, DSNodeHandle>::iterator I = ScalarMap.begin(),
More information about the llvm-commits
mailing list