diff options
author | Chris Lattner <sabre@nondot.org> | 2002-10-03 21:55:13 +0000 |
---|---|---|
committer | Chris Lattner <sabre@nondot.org> | 2002-10-03 21:55:13 +0000 |
commit | 9dfb9f44cce65855923fe712bff162cf667346fc (patch) | |
tree | d236fd2345e319d1076b32e1893091552b5afff6 | |
parent | 9a389b3cced7404e081ee98902d2d635cadea2a1 (diff) | |
download | bcm5719-llvm-9dfb9f44cce65855923fe712bff162cf667346fc.tar.gz bcm5719-llvm-9dfb9f44cce65855923fe712bff162cf667346fc.zip |
sgefa uses truely huge data structures nodes. Only print part of them if they
are so big
llvm-svn: 4035
-rw-r--r-- | llvm/lib/Analysis/DataStructure/Printer.cpp | 9 |
1 files changed, 7 insertions, 2 deletions
diff --git a/llvm/lib/Analysis/DataStructure/Printer.cpp b/llvm/lib/Analysis/DataStructure/Printer.cpp index b78861c1347..51ebe632eb4 100644 --- a/llvm/lib/Analysis/DataStructure/Printer.cpp +++ b/llvm/lib/Analysis/DataStructure/Printer.cpp @@ -103,17 +103,22 @@ void DSNode::print(std::ostream &O, const DSGraph *G) const { O << "\tNode" << (void*)this << " [ label =\"{" << Caption; + unsigned Size = getSize(); + if (Size > 64) Size = 64; // Don't print out HUGE graph nodes! + if (getSize() != 0) { O << "|{"; - for (unsigned i = 0; i < getSize(); ++i) { + for (unsigned i = 0; i < Size; ++i) { if (i) O << "|"; O << "<g" << i << ">" << (int)MergeMap[i]; } + if (Size != getSize()) + O << "|truncated..."; O << "}"; } O << "}\"];\n"; - for (unsigned i = 0; i != getSize(); ++i) + for (unsigned i = 0; i != Size; ++i) if (const DSNodeHandle *DSN = getLink(i)) writeEdge(O, this, ":g", i, *DSN); } |