[LLVMdev] dump cfg after each pass
Duncan Sands
baldrick at free.fr
Wed Oct 27 11:38:58 PDT 2010
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.
More information about the llvm-dev
mailing list