[llvm-dev] Printing the CFG for a .ll file

Doerfert, Johannes via llvm-dev llvm-dev at lists.llvm.org
Thu May 16 21:29:06 PDT 2019


Hi Charles,

Through clang:

  clang -mllvm -dot-cfg foo.c

Through opt:

  opt -dot-cfg foo.bc
  opt -dot-cfg foo.ll


You can dot various other things, check opt -help-hidden for the
"-dot-XXXX" options (or clang -mllvm -help-hidden I guess).

Cheers,
  Johannes


On 05/16, Charles DeAndre Donte Noble via llvm-dev wrote:
> Hello all,
> 
> 
> Is there an existing tool/option to print a control flow graph for a llvm file into dot format?
> 
> 
> Regards,
> 
> Charles Noble

> _______________________________________________
> LLVM Developers mailing list
> llvm-dev at lists.llvm.org
> https://lists.llvm.org/cgi-bin/mailman/listinfo/llvm-dev


-- 

Johannes Doerfert
Researcher

Argonne National Laboratory
Lemont, IL 60439, USA

jdoerfert at anl.gov
-------------- next part --------------
A non-text attachment was scrubbed...
Name: signature.asc
Type: application/pgp-signature
Size: 228 bytes
Desc: not available
URL: <http://lists.llvm.org/pipermail/llvm-dev/attachments/20190517/522832f2/attachment.sig>


More information about the llvm-dev mailing list