[llvm-commits] CVS: llvm/lib/CodeGen/SelectionDAG/SelectionDAGPrinter.cpp

Reid Spencer reid at x10sys.com
Wed Jul 13 19:14:35 PDT 2005


See below ..

On Wed, 2005-07-13 at 20:11 -0500, Chris Lattner wrote:
> 
> 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())) {

This depends on Graphviz being in the path at runtime. That might not be
the case. Since autoconf already figured out the full path for Graphviz,
we should use that path. I will make that path available in the variable
LLVM_PATH_GRAPHVIZ for you so this should be:

if (system((LLVM_PATH_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");
> 
> 
> 
> _______________________________________________
> llvm-commits mailing list
> llvm-commits at cs.uiuc.edu
> http://mail.cs.uiuc.edu/mailman/listinfo/llvm-commits
-------------- next part --------------
A non-text attachment was scrubbed...
Name: signature.asc
Type: application/pgp-signature
Size: 189 bytes
Desc: This is a digitally signed message part
URL: <http://lists.llvm.org/pipermail/llvm-commits/attachments/20050713/fa183d50/attachment.sig>


More information about the llvm-commits mailing list