mozilla/rust — pull request #14202 by pnkfelix (2014-05-14 18:00:03+00:00)
Title: Add flow-graph visualization (via graphviz) to rustc

Passing `--pretty=flowgraph` makes rustc print a control flow graph.

In practice, you will also need to pass the additional options:

* `-o ` to emit output to a `.dot` file for graphviz, and
* `--pretty-node=` to specify the node-id for the block you want to print.

(You can only print the flow-graph for a particular block in the AST.)

These changes do not generalize the rest of the pretty-printer to
support the `--pretty-node=` option for printing subtrees of the
AST, but that is obviously a potential future feature that we could
add on. It is orthogonal to flow-graph printing, though.