diff options
author | Chris Lattner <sabre@nondot.org> | 2002-10-16 01:18:27 +0000 |
---|---|---|
committer | Chris Lattner <sabre@nondot.org> | 2002-10-16 01:18:27 +0000 |
commit | eb15c6d2b3e609b81bdfd5a26b5fe5f274215911 (patch) | |
tree | 6536eb5fb26ae4d13bbb670a19b413e5cb67b00b /llvm/lib/Analysis/DataStructure/Printer.cpp | |
parent | cf5eb3317ac8b79462f24ea0633a9c24e3795bf6 (diff) | |
download | bcm5719-llvm-eb15c6d2b3e609b81bdfd5a26b5fe5f274215911.tar.gz bcm5719-llvm-eb15c6d2b3e609b81bdfd5a26b5fe5f274215911.zip |
- DSGraph Printing Improvements:
* Print edge source labels again
* Override node shape to be Mrecord again, instead of just record.
llvm-svn: 4193
Diffstat (limited to 'llvm/lib/Analysis/DataStructure/Printer.cpp')
-rw-r--r-- | llvm/lib/Analysis/DataStructure/Printer.cpp | 14 |
1 files changed, 7 insertions, 7 deletions
diff --git a/llvm/lib/Analysis/DataStructure/Printer.cpp b/llvm/lib/Analysis/DataStructure/Printer.cpp index b7c27148362..0c0724ebdd1 100644 --- a/llvm/lib/Analysis/DataStructure/Printer.cpp +++ b/llvm/lib/Analysis/DataStructure/Printer.cpp @@ -177,8 +177,7 @@ struct DOTGraphTraits<DSGraph*> : 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<DSGraph*> : 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"; |