[llvm-commits] [poolalloc] r110220 - in /poolalloc/trunk: include/dsa/DSNode.h lib/DSA/DataStructure.cpp
John Criswell
criswell at uiuc.edu
Wed Aug 4 10:32:35 PDT 2010
Author: criswell
Date: Wed Aug 4 12:32:35 2010
New Revision: 110220
URL: http://llvm.org/viewvc/llvm-project?rev=110220&view=rev
Log:
Added the dumpFuncs() method to help debug callgraph problems from gdb.
Added an assertion to mergeTypeInfo().
Modified:
poolalloc/trunk/include/dsa/DSNode.h
poolalloc/trunk/lib/DSA/DataStructure.cpp
Modified: poolalloc/trunk/include/dsa/DSNode.h
URL: http://llvm.org/viewvc/llvm-project/poolalloc/trunk/include/dsa/DSNode.h?rev=110220&r1=110219&r2=110220&view=diff
==============================================================================
--- poolalloc/trunk/include/dsa/DSNode.h (original)
+++ poolalloc/trunk/include/dsa/DSNode.h Wed Aug 4 12:32:35 2010
@@ -390,6 +390,7 @@
void print(llvm::raw_ostream &O, const DSGraph *G) const;
void dump() const;
+ void dumpFuncs();
void assertOK() const;
Modified: poolalloc/trunk/lib/DSA/DataStructure.cpp
URL: http://llvm.org/viewvc/llvm-project/poolalloc/trunk/lib/DSA/DataStructure.cpp?rev=110220&r1=110219&r2=110220&view=diff
==============================================================================
--- poolalloc/trunk/lib/DSA/DataStructure.cpp (original)
+++ poolalloc/trunk/lib/DSA/DataStructure.cpp Wed Aug 4 12:32:35 2010
@@ -308,6 +308,15 @@
}
}
+void DSNode::dumpFuncs() {
+ std::vector<const Function *> List;
+ addFullFunctionList (List);
+ for (unsigned index = 0; index < List.size(); ++index) {
+ std::cerr << List[index]->getNameStr() << std::endl;
+ }
+ return;
+}
+
/// mergeTypeInfo - This method merges the specified type into the current node
/// at the specified offset. This may update the current node's type record if
/// this gives more information to the node, it may do nothing to the node if
@@ -1177,6 +1186,7 @@
assert(F && "No function");
DSGraph *&G = DSInfo[F];
if (!G) {
+ assert (F->isDeclaration() || GraphSource->hasDSGraph(*F));
//Clone or Steal the Source Graph
DSGraph* BaseGraph = GraphSource->getDSGraph(*F);
if (Clone) {
More information about the llvm-commits
mailing list