[llvm-commits] CVS: llvm/lib/Analysis/DataStructure/DataStructure.cpp
Chris Lattner
lattner at cs.uiuc.edu
Thu Jan 22 10:37:06 PST 2004
Changes in directory llvm/lib/Analysis/DataStructure:
DataStructure.cpp updated: 1.133 -> 1.134
---
Log message:
Ok, I'm tired of pulling out all my timers to check stuff in, just do it.
---
Diffs of the changes: (+18 -0)
Index: llvm/lib/Analysis/DataStructure/DataStructure.cpp
diff -u llvm/lib/Analysis/DataStructure/DataStructure.cpp:1.133 llvm/lib/Analysis/DataStructure/DataStructure.cpp:1.134
--- llvm/lib/Analysis/DataStructure/DataStructure.cpp:1.133 Thu Jan 22 10:31:08 2004
+++ llvm/lib/Analysis/DataStructure/DataStructure.cpp Thu Jan 22 10:36:28 2004
@@ -29,6 +29,15 @@
Statistic<> NumCallNodesMerged("dsnode", "Number of call nodes merged");
};
+#if 0
+#define TIME_REGION(VARNAME, DESC) \
+ NamedRegionTimer VARNAME(DESC)
+#else
+#define TIME_REGION(VARNAME, DESC)
+#endif
+
+
+
using namespace DS;
DSNode *DSNodeHandle::HandleForwarding() const {
@@ -929,6 +938,7 @@
void DSGraph::cloneInto(const DSGraph &G, ScalarMapTy &OldValMap,
ReturnNodesTy &OldReturnNodes, NodeMapTy &OldNodeMap,
unsigned CloneFlags) {
+ TIME_REGION(X, "cloneInto");
assert(OldNodeMap.empty() && "Returned OldNodeMap should be empty!");
assert(&G != this && "Cannot clone graph into itself!");
@@ -956,6 +966,8 @@
for (unsigned i = FN, e = Nodes.size(); i != e; ++i)
Nodes[i]->remapLinks(OldNodeMap);
+ { TIME_REGION(X, "cloneInto:scalars");
+
// Copy the scalar map... merging all of the global nodes...
for (ScalarMapTy::const_iterator I = G.ScalarMap.begin(),
E = G.ScalarMap.end(); I != E; ++I) {
@@ -970,6 +982,7 @@
InlinedGlobals.insert(GV);
}
}
+ }
if (!(CloneFlags & DontCloneCallNodes)) {
// Copy the function calls list...
@@ -1017,6 +1030,7 @@
NodeMapTy &OldNodeMap,
unsigned CloneFlags) {
+ TIME_REGION(X, "clonePartiallyInto");
assert(OldNodeMap.empty() && "Returned OldNodeMap should be empty!");
assert(&G != this && "Cannot clone graph into itself!");
@@ -1359,6 +1373,8 @@
// we don't have to perform any non-trivial analysis here.
//
void DSGraph::removeTriviallyDeadNodes() {
+ TIME_REGION(X, "removeTriviallyDeadNodes");
+
removeIdenticalCalls(FunctionCalls);
removeIdenticalCalls(AuxFunctionCalls);
@@ -1546,6 +1562,8 @@
// Reduce the amount of work we have to do... remove dummy nodes left over by
// merging...
removeTriviallyDeadNodes();
+
+ TIME_REGION(X, "removeDeadNodes");
// FIXME: Merge non-trivially identical call nodes...
More information about the llvm-commits
mailing list