Thanks for the tip. It works.<div><br></div><div>David<br><br><div class="gmail_quote">On Wed, Oct 27, 2010 at 11:38 AM, Duncan Sands <span dir="ltr"><<a href="mailto:baldrick@free.fr">baldrick@free.fr</a>></span> wrote:<br>
<blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex;">Hi David,<br>
<div class="im"><br>
> A dumb question -- is there a way to dump cfg after each pass, something like:<br>
> --print-cfg-after=sccp, or is there a standard post-processing script that<br>
> builds the cfg vcg/dot file from the ir dump?<br>
<br>
</div>if your IR is dumped to ir.ll, you can do this to see the cfg:<br>
   opt -disable-output -view-cfg ir.ll<br>
You may want to use -view-cfg-only rather than -view-cfg if you are<br>
not interested in the instructions, only the cfg.  You could probably<br>
also do something like the following to output the cfg after each pass:<br>
   opt -pass1 -view-cfg -pass2 -view-cfg ... -passN -view-cfg file.ll<br>
<br>
Ciao,<br>
<br>
Duncan.<br>
_______________________________________________<br>
LLVM Developers mailing list<br>
<a href="mailto:LLVMdev@cs.uiuc.edu">LLVMdev@cs.uiuc.edu</a>         <a href="http://llvm.cs.uiuc.edu" target="_blank">http://llvm.cs.uiuc.edu</a><br>
<a href="http://lists.cs.uiuc.edu/mailman/listinfo/llvmdev" target="_blank">http://lists.cs.uiuc.edu/mailman/listinfo/llvmdev</a><br>
</blockquote></div><br></div>