summaryrefslogtreecommitdiffstats
path: root/llvm/lib/Analysis/DataStructure
diff options
context:
space:
mode:
authorChris Lattner <sabre@nondot.org>2002-10-16 20:16:16 +0000
committerChris Lattner <sabre@nondot.org>2002-10-16 20:16:16 +0000
commit7b0ebe9983f4042ed0e6ed1d8ac358a5774d8fae (patch)
treeda6793e28463f9af75c9c35ec5197dbc059660d8 /llvm/lib/Analysis/DataStructure
parent6d44463ac2f919f0c5a16ed4a53c64cce065110c (diff)
downloadbcm5719-llvm-7b0ebe9983f4042ed0e6ed1d8ac358a5774d8fae.tar.gz
bcm5719-llvm-7b0ebe9983f4042ed0e6ed1d8ac358a5774d8fae.zip
Make sure to print out the call nodes as well
llvm-svn: 4203
Diffstat (limited to 'llvm/lib/Analysis/DataStructure')
-rw-r--r--llvm/lib/Analysis/DataStructure/Printer.cpp15
1 files changed, 14 insertions, 1 deletions
diff --git a/llvm/lib/Analysis/DataStructure/Printer.cpp b/llvm/lib/Analysis/DataStructure/Printer.cpp
index 4235fefdce0..614cb1fd0e4 100644
--- a/llvm/lib/Analysis/DataStructure/Printer.cpp
+++ b/llvm/lib/Analysis/DataStructure/Printer.cpp
@@ -210,11 +210,24 @@ struct DOTGraphTraits<DSGraph*> : public DefaultDOTGraphTraits {
GW.emitEdge((void*)1, -1, G->getRetNode().getNode(),
RetEdgeDest, "arrowtail=tee,color=gray63");
}
+
+ // Output all of the call nodes...
+ const std::vector<std::vector<DSNodeHandle> > &FCs = G->getFunctionCalls();
+ for (unsigned i = 0, e = FCs.size(); i != e; ++i) {
+ const std::vector<DSNodeHandle> &Call = FCs[i];
+ GW.emitSimpleNode(&Call, "shape=record", "call", Call.size());
+
+ for (unsigned j = 0, e = Call.size(); j != e; ++j)
+ if (Call[j].getNode()) {
+ int EdgeDest = Call[j].getOffset();
+ if (EdgeDest == 0) EdgeDest = -1;
+ GW.emitEdge(&Call, j, Call[j].getNode(), EdgeDest, "color=gray63");
+ }
+ }
}
};
-
void DSGraph::writeGraphToFile(std::ostream &O, const string &GraphName) {
string Filename = GraphName + ".dot";
O << "Writing '" << Filename << "'...";
OpenPOWER on IntegriCloud