------- Comment #49 from hubicka at gcc dot gnu dot org  2009-02-22 13:23 
-------
Similarly as in PR c/12245 we build a tons of unnecesary CONVERT_EXPRs. 
Avoiding this by same patch as attached to PR c/12245 brings garbage donwn
by 54% from:

cp/lex.c:511 (build_lang_decl)                        94176: 0.0%     116432:
0.0%     826264: 0.1%      98952: 0.0%       4247
toplev.c:1538 (realloc_for_line_map)                      0: 0.0%    1310720:
0.1%    1316864: 0.1%     555008: 0.1%          7
ggc-common.c:187 (ggc_calloc)                     134478488:12.0%     188112:
0.0%  134356240:14.6%      18504: 0.0%       2913
cp/decl.c:4683 (reshape_init_array_1)                     0: 0.0% 
374786120:20.5%  373090856:40.6%  211006352:43.0%         22
cp/parser.c:14709 (cp_parser_initializer_list)    373090856:33.3% 
374786120:20.5%         88: 0.0%  211006360:43.0%         23
tree.c:1004 (build_int_cst_wide)                       8640: 0.0%          0:
0.0%  402626592:43.8%          0: 0.0%    8388234
convert.c:752 (convert_to_integer)                603950328:54.0%          0:
0.0%          0: 0.0%   67105592:13.7%    8388199
Total                                            1118959027       1826757514   
    919671455        491189724         16977745
source location                                     Garbage            Freed   
         Leak         Overhead            Times

to:

cp/lex.c:511 (build_lang_decl)                        94176: 0.0%     116432:
0.0%     826264: 0.1%      98952: 0.0%       4247
toplev.c:1538 (realloc_for_line_map)                      0: 0.0%    1310720:
0.1%    1316864: 0.1%     555008: 0.1%          7
ggc-common.c:187 (ggc_calloc)                     134478488:26.1%     188112:
0.0%  134356240:14.6%      18504: 0.0%       2913
cp/decl.c:4683 (reshape_init_array_1)                     0: 0.0% 
374786120:20.5%  373090856:40.6%  211006352:49.8%         22
cp/parser.c:14709 (cp_parser_initializer_list)    373090856:72.4% 
374786120:20.5%         88: 0.0%  211006360:49.8%         23
tree.c:1004 (build_int_cst_wide)                       8640: 0.0%          0:
0.0%  402626592:43.8%          0: 0.0%    8388234
Total                                             515008771       1826757514   
    919671455        424084140          8589547
source location                                     Garbage            Freed   
         Leak         Overhead            Times

so saving about 0.5GB of RAM and speeding up correspondingly too.  We can still
improve but this seems low hanging fruit.

Honza


-- 

hubicka at gcc dot gnu dot org changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
                 CC|                            |hubicka at gcc dot gnu dot
                   |                            |org


http://gcc.gnu.org/bugzilla/show_bug.cgi?id=14179

Reply via email to