[LLVMdev] callgraph utility with opt

Duncan Sands baldrick at free.fr
Wed Mar 4 13:02:54 PST 2009


Hi Shweta,

> I wanted to know how to use -callgraph option provided with opt. I have been
> using a -print-callgraph for generating a CG but I don't want the o/p to go
> to a dot file. Is it required to build a pass using CallGraph.cpp or we can
> directly use the option with a .bc file.

if I do
  llvm-gcc -c -o - -emit-llvm cg.c | opt -print-callgraph -disable-output
then the output is printed on my console and does not go to a dot file.
If it is going to a dot file in your case then perhaps you made some
modifications to LLVM?

Ciao,

Duncan.



More information about the llvm-dev mailing list