This is the mail archive of the gcc-bugs@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]

[Bug c/12245] [5/6/7 regression] Uses lots of memory when compiling large initialized arrays


https://gcc.gnu.org/bugzilla/show_bug.cgi?id=12245

--- Comment #62 from Richard Biener <rguenth at gcc dot gnu.org> ---
Main issue is still for GCC:

Kind                   Nodes      Bytes
----------------------------------------
constants            1630852   39140573

integer_cst                      1630844


c/c-typeck.c:9020 (output_init_element)                   0:  0.0%  33554552:
50.0%  33554440: 31.2%       152:  0.2%        20

and for G++:

Kind                   Nodes      Bytes
----------------------------------------
constants            1630864   39140861

integer_cst                      1630856


cp/constexpr.c:4814 (maybe_constant_value)         67108816:100.0% 100663104   
    17:  0.0%       ggc

(huh!)

cp/parser.c:21811 (cp_parser_initializer_list)     33554440: 99.8%  33554552: 
8.3%         0:  0.0%       152:  0.1%        20


that maybe_constant_value can be improved to

cp/constexpr.c:4817 (maybe_constant_value)             2032: 13.6%      2144   
     2:  0.0%       ggc

with a simple patch.

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