Hi.

There were some questions from Hrishikesh about requested goals
of the project. Thus I would like to specify what I'm aware of:

1) symbol table
   - list all symbols
   - print details info about a symbol (symtab_node::debug)
   - print GIMPLE body of a function
     - I would like to see supporting levels what we have e.g.:

-fdump-tree-optimized-blocks
-fdump-tree-optimized-stats

It's defined in dumpfile.h:
enum dump_flag

   - I would like to see constructor of a global variable:
    DECL_INITIAL (...), probably print_generic_expr will work

we can consider adding similar options seen in nm:

       --no-demangle
           Do not demangle low-level symbol names.  This is the default.

       -p
       --no-sort
           Do not bother to sort the symbols in any order; print them in the 
order encountered.
       -S
       --print-size
           Print both value and size of defined symbols for the "bsd" output 
style.  This option has no effect for object formats that do not record symbol 
sizes, unless --size-sort is also used in which case a calculated size is 
displayed.
       -r
       --reverse-sort
           Reverse the order of the sort (whether numeric or alphabetic); let 
the last come first.

       --defined-only
           Display only defined symbols for each object file.

       --size-sort
           Sort symbols by size.  For ELF objects symbol sizes are read from 
the ELF, for other object types the symbol sizes are computed as the difference 
between the value of the symbol and the value of the symbol with the next 
higher value.  If the "bsd" output
           format is used the size of the symbol is printed, rather than the 
value, and -S must be used in order both size and value to be printed.

It's just for inspiration, see man nm

2) statistics
   - GIMPLE and TREE statistics, similar to what we do for -fmem-report

3) LTO objects
   - we should list read files, archives, ... and print some stats about it

4) tree types
   - list types
   - print one (debug_tree) with different verbosity level, again 'enum 
dump_flag'

5) visualization
   - should be done, via -fdump-ipa-icf-graph, generates .dot file. Should be 
easy to use.

6) separation to lto-dump binary
   - here I can help, I'll cook a patch for it

I believe it's a series of small patches that can implement that. I hope you'll
invent even more options as you play with LTO.

Martin



Reply via email to