From: Chris Lattner Date: Wed, 16 Oct 2002 01:18:27 +0000 (+0000) Subject: - DSGraph Printing Improvements: X-Git-Url: http://demsky.eecs.uci.edu/git/?a=commitdiff_plain;h=f29e307765000e2aca44440caafadfd29a656a4f;p=oota-llvm.git - DSGraph Printing Improvements: * Print edge source labels again * Override node shape to be Mrecord again, instead of just record. git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@4193 91177308-0d34-0410-b5e6-96231b3b80d8 --- diff --git a/lib/Analysis/DataStructure/Printer.cpp b/lib/Analysis/DataStructure/Printer.cpp index b7c27148362..0c0724ebdd1 100644 --- a/lib/Analysis/DataStructure/Printer.cpp +++ b/lib/Analysis/DataStructure/Printer.cpp @@ -177,8 +177,7 @@ struct DOTGraphTraits : public DefaultDOTGraphTraits { } static const char *getGraphProperties(DSGraph *G) { - return "\tnode [shape=Mrecord];\n" - "\tedge [arrowtail=\"dot\"];\n" + return "\tedge [arrowtail=\"dot\"];\n" "\tsize=\"10,7.5\";\n" "\trotate=\"90\";\n"; } @@ -188,12 +187,13 @@ struct DOTGraphTraits : public DefaultDOTGraphTraits { } static std::string getNodeAttributes(DSNode *N) { - return "";//fontname=Courier"; + return "shape=Mrecord";//fontname=Courier"; } - //static int getEdgeSourceLabel(DSNode *Node, node_iterator I) { - // return MergeMap[i]; - // } + static int getEdgeSourceLabel(DSNode *Node, DSNode::iterator I) { + assert(Node == I.getNode() && "Iterator not for this node!"); + return Node->getMergeMapLabel(I.getLink()); + } }; @@ -205,7 +205,7 @@ void DSGraph::writeGraphToFile(std::ostream &O, const string &GraphName) { if (F.good()) { WriteGraph(F, this); - print(F); + //print(F); O << " [" << getGraphSize() << "+" << getFunctionCalls().size() << "]\n"; } else { O << " error opening file for writing!\n";