This is the mail archive of the
gcc@gcc.gnu.org
mailing list for the GCC project.
Re: dump CFG and callgraph
- From: Jim Wilson <wilson at specifix dot com>
- To: sean yang <seanatpurdue at hotmail dot com>
- Cc: gcc at gcc dot gnu dot org
- Date: Tue, 01 Nov 2005 11:18:55 -0800
- Subject: Re: dump CFG and callgraph
- References: <BAY105-F203D4F2532701BA1A3BF40C06F0@phx.gbl>
sean yang wrote:
(1) if I want to dump a gimple tree representation of a program, where
should I start to look at? And I read gcc internal manual, the control
flow graph information is represented by BB data structure. If I want to
walk through a control flow graph, where should I start to look at?
-fdump-tree-all will dump gimple after every gimple optimization pass.
Try looking at the output files, and try looking at the code that does
the dumping.
(2) Can I dump call-graph information to a file from gcc? It seems that
-da doesn't give such a file.
-fdump-ipa-all will dump the cgraph info. You will need to enable IPA
optimizations to see this stuff. Try compiling with -O3. The cgraph
code is used even without IPA, but apparently we don't have support for
dumping it in that case. Probably an oversight.
cgraph.c says it builds "intraprocedural optimization", which seems a
bit confusing(considering that callgraph can be used as inlining etc.)
Looks like a typo. English isn't the author's first language.
--
Jim Wilson, GNU Tools Support, http://www.specifix.com