some tree-ssa vs mainline stats

Steven Bosscher s.bosscher@student.tudelft.nl
Thu Jun 19 06:52:00 GMT 2003


Dan Nicolaescu wrote:

>I've done some empirical comparisons of GCC from CVS HEAD and the
>tree-ssa branch. 
>One comparison was for compiling a C file: combine.i,
>the other one was for compiling a C++ file: generate-3.4.ii from PR8361
>
>First the ggc_alloc-ed memory, printed using this patch
>http://gcc.gnu.org/ml/gcc-patches/2003-06/msg01972.html
>
>
>
>                                 generate-3.4.ii SSA  generate-3.4.ii HEAD
>Total Overhead:                         83783064        34185222
>Total Allocated:                       731518424       397362416
>Total Overhead under   32B:              7872708          652308
>Total Allocated under  32B:            332573472       194445000
>Total Overhead under   64B:             29934672         6397392
>Total Allocated under  64B:            482390040       265828848
>Total Overhead under  128B:             40725380         9095252
>Total Allocated under 128B:            585024728       314759152
>
>
>                                   combine.i SSA  combine.i HEAD
>Total Overhead:                          6631608         2010876
>Total Allocated:                        72673776        48363184
>Total Overhead under   32B:              2418024           14520
>Total Allocated under  32B:             43772364        32016332
>Total Overhead under   64B:              3824092          478592
>Total Allocated under  64B:             55117808        37752656
>Total Overhead under  128B:              4282744          611152
>Total Allocated under 128B:             61364720        40886448
>
>                                        all the values are in bytes     
>
>Observations:
> - tree-ssa is allocating a lot more memory 
> - the overheads are a higher for tree-ssa, so it seems that it needs
>   a few extra values added to ggc-page.c:extra_order_size_table
>
>
>Total # of identifiers:
>generate-3.4.ii SSA  84136 
>generate-3.4.ii HEAD  8131 
>combine.i       SSA  10987 
>combine.i       HEAD  4389
>
>
>Does tree-ssa create unique identifiers for each ssa name, or
>something similar? Is that OK?
>

It creates a unique identifier for each temporary it needs to gimplify 
the function tree.  All you really need for a temporary is a name (ie. 
just a string) because you never have to lookup the identifier or the 
DECL it represents. But temporaries still need a identifier nodes 
because DECL_NAME and DECL_ASSEMBLER_NAME are IDENTIFIER_NODEs. This 
also causes some memory overhead: each IDENTIFIER_NODE in C++ is 64 
bytes, and you really only need 8 (a char * pointing to the name in the 
string pool and an int for the name length) for a temporary.

Gr.
Steven




More information about the Gcc mailing list