[LLVMdev] dump cfg after each pass

Xinliang David Li xinliangli at gmail.com
Wed Oct 27 13:26:45 PDT 2010


Thanks for the tip. It works.

David

On Wed, Oct 27, 2010 at 11:38 AM, Duncan Sands <baldrick at free.fr> wrote:

> Hi David,
>
> > A dumb question -- is there a way to dump cfg after each pass, something
> like:
> > --print-cfg-after=sccp, or is there a standard post-processing script
> that
> > builds the cfg vcg/dot file from the ir dump?
>
> if your IR is dumped to ir.ll, you can do this to see the cfg:
>   opt -disable-output -view-cfg ir.ll
> You may want to use -view-cfg-only rather than -view-cfg if you are
> not interested in the instructions, only the cfg.  You could probably
> also do something like the following to output the cfg after each pass:
>   opt -pass1 -view-cfg -pass2 -view-cfg ... -passN -view-cfg file.ll
>
> Ciao,
>
> Duncan.
> _______________________________________________
> LLVM Developers mailing list
> LLVMdev at cs.uiuc.edu         http://llvm.cs.uiuc.edu
> http://lists.cs.uiuc.edu/mailman/listinfo/llvmdev
>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.llvm.org/pipermail/llvm-dev/attachments/20101027/47f7a2d6/attachment.html>


More information about the llvm-dev mailing list