This is the mail archive of the
gcc-bugs@gcc.gnu.org
mailing list for the GCC project.
[Bug c++/12850] memory consumption for heavy template instantiations tripled since 3.3
- From: "hubicka at gcc dot gnu dot org" <gcc-bugzilla at gcc dot gnu dot org>
- To: gcc-bugs at gcc dot gnu dot org
- Date: 23 Feb 2009 16:29:32 -0000
- Subject: [Bug c++/12850] memory consumption for heavy template instantiations tripled since 3.3
- References: <bug-12850-1824@http.gcc.gnu.org/bugzilla/>
- Reply-to: gcc-bugzilla at gcc dot gnu dot org
------- Comment #46 from hubicka at gcc dot gnu dot org 2009-02-23 16:29 -------
So with brand new tuplified world, we need new statistics ;)
After parsing we are still the same:
cfg.c:216 (connect_src) 608608: 0.2% 520:
0.0% 3028808: 1.6% 519680: 1.3% 64954
cp/lex.c:511 (build_lang_decl) 805432: 0.3% 209648:
0.6% 3196488: 1.7% 349552: 0.9% 18896
stringpool.c:73 (alloc_node) 65088: 0.0% 0:
0.0% 3208992: 1.7% 0: 0.0% 34105
fold-const.c:7969 (build_fold_addr_expr_with_typ 530352: 0.2% 0:
0.0% 3440880: 1.8% 441248: 1.1% 55156
cfg.c:226 (connect_dest) 598696: 0.2% 180224:
0.5% 3484960: 1.8% 594504: 1.5% 73663
cgraph.c:432 (cgraph_create_node) 0: 0.0% 0:
0.0% 3712320: 1.9% 412480: 1.1% 12890
gimple-low.c:888 (record_vars_into) 0: 0.0% 0:
0.0% 3808032: 2.0% 0: 0.0% 79334
cp/pt.c:8398 (tsubst_decl) 2244888: 0.9% 0:
0.0% 4552704: 2.4% 357768: 0.9% 44721
tree.c:6101 (build_method_type_directly) 1946800: 0.8% 0:
0.0% 4704000: 2.5% 266032: 0.7% 33254
tree-inline.c:3595 (copy_tree_r) 9428112: 3.7% 0:
0.0% 4793248: 2.5% 1243776: 3.2% 186815
cfg.c:142 (alloc_block) 1046016: 0.4% 0:
0.0% 4988448: 2.6% 0: 0.0% 62859
cgraph.c:681 (cgraph_create_edge) 0: 0.0% 0:
0.0% 5183328: 2.7% 0: 0.0% 53993
cfg.c:280 (unchecked_make_edge) 0: 0.0% 696256:
1.9% 5271424: 2.8% 0: 0.0% 93245
gimplify.c:4295 (gimplify_modify_expr) 1183600: 0.5% 0:
0.0% 5519400: 2.9% 300632: 0.8% 57164
gimple-iterator.c:446 (gsi_insert_after_without_ 4903960: 1.9% 0:
0.0% 5826440: 3.1% 2146080: 5.5% 268260
gimple.c:287 (gimple_build_call_1) 871144: 0.3% 0:
0.0% 6066056: 3.2% 247408: 0.6% 51874
tree.c:964 (build_int_cst_wide) 6096: 0.0% 0:
0.0% 10089256: 5.3% 3310168: 8.6% 2292
gimplify.c:522 (create_tmp_var_raw) 453768: 0.2% 0:
0.0% 10537632: 5.5% 523400: 1.4% 65425
cp/lex.c:591 (copy_decl) 26304: 0.0% 0:
0.0% 13586520: 7.1% 1326296: 3.4% 56894
Total 254844605 37217584
190405469 38695562 5886026
source location Garbage Freed
Leak Overhead Times
After early optimizations:
tree-inline.c:4051 (copy_decl_to_var) 145488: 0.0% 0:
0.0% 5595072: 2.0% 273360: 0.4% 34170
gimple-iterator.c:446 (gsi_insert_after_without_ 14165480: 3.2% 0:
0.0% 5633680: 2.0% 3959832: 5.9% 494979
ggc-common.c:187 (ggc_calloc) 565872: 0.1%
17553976:12.6% 5692736: 2.1% 423928: 0.6% 67925
cgraph.c:681 (cgraph_create_edge) 0: 0.0% 0:
0.0% 5958624: 2.2% 0: 0.0% 62069
tree-ssanames.c:141 (make_ssa_name_fn) 16722480: 3.8% 0:
0.0% 8318040: 3.0% 1669368: 2.5% 208671
gimplify.c:522 (create_tmp_var_raw) 5067048: 1.2% 0:
0.0% 8897280: 3.2% 664968: 1.0% 83121
tree.c:964 (build_int_cst_wide) 6096: 0.0% 0:
0.0% 10327480: 3.8% 3388168: 5.1% 2341
tree-dfa.c:150 (create_var_ann) 0: 0.0%
23279784:16.7% 10578392: 3.8% 3078016: 4.6% 384752
tree-inline.c:3595 (copy_tree_r) 49340008:11.2% 0:
0.0% 12558984: 4.6% 5762144: 8.6% 796535
gimple.c:2071 (gimple_copy) 11219128: 2.6% 0:
0.0% 13100280: 4.8% 1193408: 1.8% 209046
cp/lex.c:591 (copy_decl) 62424: 0.0% 0:
0.0% 13550400: 4.9% 1326296: 2.0% 56894
tree-inline.c:484 (remap_block) 1924416: 0.4% 0:
0.0% 14794832: 5.4% 1286096: 1.9% 160762
tree-ssa-operands.c:499 (ssa_operand_alloc) 0: 0.0%
33737566:24.3% 17976728: 6.5% 3547382: 5.3% 11222
tree-inline.c:4094 (copy_decl_no_change) 12372728: 2.8% 0:
0.0% 29185744:10.6% 1892440: 2.8% 250867
Total 439703478 139072686
274931123 66651575 9262384
source location Garbage Freed
Leak Overhead Times
Declarations and debug info being major consumer. We improved 293->274
and final compilation:
cp/call.c:2348 (add_template_candidate_real) 31457040: 2.5% 0:
0.0% 0: 0.0% 3096816: 1.8% 457682
gimple-iterator.c:446 (gsi_insert_after_without_ 32206200: 2.5% 0:
0.0% 0: 0.0% 6441240: 3.8% 805155
tree-phinodes.c:157 (allocate_phi_node) 33346952: 2.6% 0:
0.0% 0: 0.0% 1121800: 0.7% 108439
rtl.c:269 (copy_rtx) 41145992: 3.2% 0:
0.0% 0: 0.0% 8084728: 4.7% 1053375
emit-rtl.c:3502 (make_insn_raw) 41827016: 3.3% 0:
0.0% 88: 0.0% 3802464: 2.2% 475308
gimple.c:2071 (gimple_copy) 43033384: 3.4% 0:
0.0% 0: 0.0% 2056248: 1.2% 367296
tree-ssanames.c:141 (make_ssa_name_fn) 72524280: 5.7% 0:
0.0% 148440: 0.1% 4844848: 2.8% 605606
tree-inline.c:4094 (copy_decl_no_change) 74338752: 5.8% 0:
0.0% 226240: 0.2% 3451120: 2.0% 447839
tree-inline.c:3595 (copy_tree_r) 97555488: 7.7% 0:
0.0% 2792: 0.0% 9116248: 5.4% 1242196
Total 1271569773 404722617
103497642 170223016 23365837
source location Garbage Freed
Leak Overhead Times
1.38GB to 1.27GB...
so not much change, but some progress ;)
--
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=12850