[llvm-commits] CVS: llvm/lib/CodeGen/SelectionDAG/SelectionDAGPrinter.cpp
Chris Lattner
lattner at cs.uiuc.edu
Wed Jul 13 18:11:06 PDT 2005
Changes in directory llvm/lib/CodeGen/SelectionDAG:
SelectionDAGPrinter.cpp updated: 1.12 -> 1.13
---
Log message:
If the Graphviz program is available, use it to visualize dot graphs.
---
Diffs of the changes: (+10 -1)
SelectionDAGPrinter.cpp | 11 ++++++++++-
1 files changed, 10 insertions(+), 1 deletion(-)
Index: llvm/lib/CodeGen/SelectionDAG/SelectionDAGPrinter.cpp
diff -u llvm/lib/CodeGen/SelectionDAG/SelectionDAGPrinter.cpp:1.12 llvm/lib/CodeGen/SelectionDAG/SelectionDAGPrinter.cpp:1.13
--- llvm/lib/CodeGen/SelectionDAG/SelectionDAGPrinter.cpp:1.12 Sat Jul 9 20:55:33 2005
+++ llvm/lib/CodeGen/SelectionDAG/SelectionDAGPrinter.cpp Wed Jul 13 20:10:55 2005
@@ -116,10 +116,19 @@
F.close();
std::cerr << "\n";
+#ifdef HAVE_GRAPHVIZ
+ std::cerr << "Running 'Graphviz' program... " << std::flush;
+ if (system(("Graphviz " + Filename).c_str())) {
+ std::cerr << "Error viewing graph: 'Graphviz' not in path?\n";
+ } else {
+ return;
+ }
+#endif
+
std::cerr << "Running 'dot' program... " << std::flush;
if (system(("dot -Tps -Nfontname=Courier -Gsize=7.5,10 " + Filename
+ " > /tmp/dag.tempgraph.ps").c_str())) {
- std::cerr << "Error running dot: 'dot' not in path?\n";
+ std::cerr << "Error viewing graph: 'dot' not in path?\n";
} else {
std::cerr << "\n";
system("gv /tmp/dag.tempgraph.ps");
More information about the llvm-commits
mailing list