tags:

views:

242

answers:

2

Older versions of gcc (for example 4.0.2 or 4.1.2) had the option -df (see http://gcc.gnu.org/onlinedocs/gcc-4.1.2/gcc/Debugging-Options.html#index-fdump_002drtl_002dcfg-357). I used this option to dump the files filename.c.134r.life2 and filename.c.126r.life1, because I want to extract some values out of these files (for example the register count for every method).

The problem is, that in current versions of gcc (for example 4.2.2) this option doesn't exist any more. There are other options and the tree dump with the name filename.c.135r.jump is pretty much the same. But the register count is missing in this dump, too and I couldn't find a dump which has that values.

Is there still a parameter, which gives me the old dumps in current gcc versions?

A: 

Citing the page you gave:

[the dump options are] used for debugging the RTL-based passes of the compiler.

You should investigate their new plug-in infrastructure, depending on what you are trying to achieve, you would be in far better position that parsing debug log not meant to bring you the information you want.

AProgrammer
Plugins are available only in GCC 4.5, which in not GA yet
qrdl
@qrdl: I've never before seen the term "general availability" applied to GCC, which is non-commercial with open development...
ephemient
@ephemient I see what you mean. Valid point. By GA I meant the official stable release. According to GCC homepage, latest stable release (or current release, as they name it) is 4.4.3, although 4.5.0 with plugin support is in active development.
qrdl
+2  A: 

Gcc 4.2-4.3 does really have dump_flow_info function, which reports number of register used. I'll search, how it can be called.

Oh, yes:

 gcc-4.3.1 file.c -fdump-rtl-all-all

produces

file.c.175r.lreg

with

file.c.175r.lreg:81 registers.

More specific: -fdump-rtl-lreg-all. Tested with 4.3

osgx
dump_flow_info ... dump_options "details", TDF_DETAILS
osgx
For any gcc you can try to find option by `-fdump-rtl-all-all` and `-fdump-tree-all-all` then `grep " registers." file.c.*` to find phase.
osgx