[LLVMdev] CFG

Chris Lattner sabre at nondot.org
Mon Apr 5 22:11:01 PDT 2004


On Mon, 5 Apr 2004, Vinay S. Belgaumkar wrote:

> Alright, I can now see my hammocks being translated into phi nodes.
> Thanx for the info.
> I now have a question regarding the analyze tool. I noticed it has a
> -help option. I tried using the -print-cfg option. It creates a
> cfg.main.dot file. Is there a graphical tool I can use to view this graph ?

Yes: download and install the 'dot' tool, which is part of the AT&T
graphviz package.

You can then process it like so:

dot -Tps < cfg.main.dot > cfg.main.ps
gv cfg.main.ps

dot can also produce output in a large number of other formats.

-Chris

-- 
http://llvm.cs.uiuc.edu/
http://www.nondot.org/~sabre/Projects/




More information about the llvm-dev mailing list