This is the mail archive of the gcc@gcc.gnu.org mailing list for the GCC project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

Re: dump CFG and callgraph


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


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]