This is the mail archive of the
gcc-regression@gcc.gnu.org
mailing list for the GCC project.
A recent patch increased GCC's memory consumption!
- From: gcctest at suse dot de
- To: jh at suse dot cz, gcc-regression at gcc dot gnu dot org
- Date: Mon, 27 Nov 2006 20:24:19 +0000
- Subject: A recent patch increased GCC's memory consumption!
Hi,
I am a friendly script caring about memory consumption in GCC. Please
contact jh@suse.cz if something is going wrong.
Comparing memory consumption on compilation of combine.i, insn-attrtab.i,
and generate-3.4.ii I got:
comparing empty function compilation at -O0 level:
Overall memory needed: 18258k -> 18269k
Peak memory use before GGC: 2233k
Peak memory use after GGC: 1940k
Maximum of released memory in single GGC run: 293k
Garbage: 422k -> 421k
Leak: 2271k
Overhead: 446k -> 446k
GGC runs: 3
comparing empty function compilation at -O0 -g level:
Overall memory needed: 18274k -> 18285k
Peak memory use before GGC: 2260k
Peak memory use after GGC: 1967k
Maximum of released memory in single GGC run: 293k
Garbage: 424k -> 424k
Leak: 2303k
Overhead: 450k -> 450k
GGC runs: 3
comparing empty function compilation at -O1 level:
Overall memory needed: 18358k -> 18369k
Peak memory use before GGC: 2233k
Peak memory use after GGC: 1940k
Maximum of released memory in single GGC run: 293k
Garbage: 427k -> 427k
Leak: 2274k
Overhead: 446k -> 446k
GGC runs: 4
comparing empty function compilation at -O2 level:
Overall memory needed: 18370k -> 18381k
Peak memory use before GGC: 2233k
Peak memory use after GGC: 1940k
Maximum of released memory in single GGC run: 293k
Garbage: 430k -> 430k
Leak: 2274k
Overhead: 447k -> 447k
GGC runs: 4
comparing empty function compilation at -O3 level:
Overall memory needed: 18370k -> 18381k
Peak memory use before GGC: 2233k
Peak memory use after GGC: 1940k
Maximum of released memory in single GGC run: 293k
Garbage: 430k -> 430k
Leak: 2274k
Overhead: 447k -> 447k
GGC runs: 4
comparing combine.c compilation at -O0 level:
Overall memory needed: 28446k -> 28457k
Peak memory use before GGC: 9309k
Peak memory use after GGC: 8848k
Maximum of released memory in single GGC run: 2665k
Garbage: 36852k -> 36866k
Leak: 6461k -> 6449k
Overhead: 4869k -> 4869k
GGC runs: 279
comparing combine.c compilation at -O0 -g level:
Amount of memory still referenced at the end of compilation increased from 9271k to 9287k, overall 0.17%
Overall memory needed: 30538k -> 30553k
Peak memory use before GGC: 10859k
Peak memory use after GGC: 10489k -> 10488k
Maximum of released memory in single GGC run: 2415k
Garbage: 37429k -> 37410k
Leak: 9271k -> 9287k
Overhead: 5537k -> 5537k
GGC runs: 271
comparing combine.c compilation at -O1 level:
Overall memory needed: 40286k -> 40301k
Peak memory use before GGC: 17299k
Peak memory use after GGC: 17124k
Maximum of released memory in single GGC run: 2274k
Garbage: 57478k -> 57475k
Leak: 6515k
Overhead: 6226k -> 6227k
GGC runs: 356
comparing combine.c compilation at -O2 level:
Overall memory needed: 29806k
Peak memory use before GGC: 17295k
Peak memory use after GGC: 17124k
Maximum of released memory in single GGC run: 2869k
Garbage: 74904k -> 74901k
Leak: 6621k
Overhead: 8477k -> 8477k
GGC runs: 412
comparing combine.c compilation at -O3 level:
Overall memory needed: 28906k
Peak memory use before GGC: 18422k -> 18423k
Peak memory use after GGC: 17851k
Maximum of released memory in single GGC run: 4100k
Garbage: 112607k -> 112604k
Leak: 6688k
Overhead: 13023k -> 13023k
GGC runs: 462
Overall memory needed: 28446k -> 28457k
Peak memory use before GGC: 9309k
Peak memory use after GGC: 8848k
Maximum of released memory in single GGC run: 2665k
Garbage: 36852k -> 36866k
Leak: 6461k -> 6449k
Overhead: 4869k -> 4869k
GGC runs: 279
comparing combine.c compilation at -O1 level:
Overall memory needed: 40286k -> 40301k
Peak memory use before GGC: 17299k
Peak memory use after GGC: 17124k
Maximum of released memory in single GGC run: 2274k
Garbage: 57478k -> 57475k
Leak: 6515k
Overhead: 6226k -> 6227k
GGC runs: 356
comparing combine.c compilation at -O2 level:
Overall memory needed: 29806k
Peak memory use before GGC: 17295k
Peak memory use after GGC: 17124k
Maximum of released memory in single GGC run: 2869k
Garbage: 74904k -> 74901k
Leak: 6621k
Overhead: 8477k -> 8477k
GGC runs: 412
comparing combine.c compilation at -O3 level:
Overall memory needed: 28906k
Peak memory use before GGC: 18422k -> 18423k
Peak memory use after GGC: 17851k
Maximum of released memory in single GGC run: 4100k
Garbage: 112607k -> 112604k
Leak: 6688k
Overhead: 13023k -> 13023k
GGC runs: 462
comparing insn-attrtab.c compilation at -O0 level:
Overall memory needed: 88246k
Peak memory use before GGC: 69793k
Peak memory use after GGC: 44203k
Maximum of released memory in single GGC run: 36964k
Garbage: 129066k -> 129064k
Leak: 9520k
Overhead: 17001k -> 17002k
GGC runs: 216
comparing insn-attrtab.c compilation at -O0 -g level:
Amount of memory still referenced at the end of compilation increased from 10951k to 11191k, overall 2.19%
Overall memory needed: 89426k -> 89298k
Peak memory use before GGC: 70942k
Peak memory use after GGC: 45459k
Maximum of released memory in single GGC run: 36964k
Garbage: 130494k -> 130219k
Leak: 10951k -> 11191k
Overhead: 17380k -> 17380k
GGC runs: 212
comparing insn-attrtab.c compilation at -O1 level:
Overall memory needed: 114182k
Peak memory use before GGC: 90379k
Peak memory use after GGC: 83741k
Maximum of released memory in single GGC run: 31852k
Garbage: 277776k -> 277773k
Leak: 9362k
Overhead: 29792k -> 29792k
GGC runs: 221
comparing insn-attrtab.c compilation at -O2 level:
Overall memory needed: 129386k -> 129402k
Peak memory use before GGC: 92608k
Peak memory use after GGC: 84720k
Maximum of released memory in single GGC run: 30398k
Garbage: 317198k -> 317195k
Leak: 9364k
Overhead: 36371k -> 36371k
GGC runs: 243
comparing insn-attrtab.c compilation at -O3 level:
Overall memory needed: 129422k -> 129406k
Peak memory use before GGC: 92634k
Peak memory use after GGC: 84746k
Maximum of released memory in single GGC run: 30585k
Garbage: 318053k -> 318050k
Leak: 9367k
Overhead: 36606k -> 36606k
GGC runs: 247
comparing Gerald's testcase PR8361 compilation at -O0 level:
Overall memory needed: 120002k
Peak memory use before GGC: 93312k -> 93309k
Peak memory use after GGC: 92385k
Maximum of released memory in single GGC run: 20013k -> 20012k
Garbage: 207743k -> 207553k
Leak: 47730k
Overhead: 20983k -> 20977k
GGC runs: 409 -> 408
comparing Gerald's testcase PR8361 compilation at -O0 -g level:
Overall memory needed: 132502k
Peak memory use before GGC: 105441k -> 105440k
Peak memory use after GGC: 104390k
Maximum of released memory in single GGC run: 19646k -> 19645k
Garbage: 214331k -> 214146k
Leak: 70689k
Overhead: 26600k -> 26594k
GGC runs: 380
comparing Gerald's testcase PR8361 compilation at -O1 level:
Overall memory needed: 119138k -> 119134k
Peak memory use before GGC: 97923k
Peak memory use after GGC: 95711k
Maximum of released memory in single GGC run: 18552k
Garbage: 446416k -> 446397k
Leak: 50112k -> 50111k
Overhead: 32789k -> 32789k
GGC runs: 559
comparing Gerald's testcase PR8361 compilation at -O2 level:
Overall memory needed: 119162k
Peak memory use before GGC: 97924k
Peak memory use after GGC: 95711k
Maximum of released memory in single GGC run: 18552k
Garbage: 505748k -> 505732k
Leak: 50796k
Overhead: 40002k -> 39996k
GGC runs: 613
comparing Gerald's testcase PR8361 compilation at -O3 level:
Overall memory needed: 118994k
Peak memory use before GGC: 97968k
Peak memory use after GGC: 96997k
Maximum of released memory in single GGC run: 18932k
Garbage: 526790k -> 526749k
Leak: 50369k
Overhead: 40926k -> 40909k
GGC runs: 627
comparing PR rtl-optimization/28071 testcase compilation at -O0 level:
Overall memory needed: 137962k
Peak memory use before GGC: 81913k
Peak memory use after GGC: 58792k
Maximum of released memory in single GGC run: 45493k
Garbage: 147245k -> 147244k
Leak: 7541k
Overhead: 25304k -> 25304k
GGC runs: 82
comparing PR rtl-optimization/28071 testcase compilation at -O0 -g level:
Overall memory needed: 138138k
Peak memory use before GGC: 82546k
Peak memory use after GGC: 59426k
Maximum of released memory in single GGC run: 45558k
Garbage: 147415k -> 147414k
Leak: 9249k
Overhead: 25769k -> 25770k
GGC runs: 88
comparing PR rtl-optimization/28071 testcase compilation at -O1 level:
Overall memory needed: 424334k -> 424330k
Peak memory use before GGC: 205233k
Peak memory use after GGC: 201009k
Maximum of released memory in single GGC run: 101903k -> 101913k
Garbage: 272136k -> 272165k
Leak: 47606k
Overhead: 31282k -> 31282k
GGC runs: 101
comparing PR rtl-optimization/28071 testcase compilation at -O2 level:
Overall memory needed: 352294k -> 352386k
Peak memory use before GGC: 206006k
Peak memory use after GGC: 201782k
Maximum of released memory in single GGC run: 108808k -> 108818k
Garbage: 352361k -> 352391k
Leak: 48189k
Overhead: 47027k -> 47027k
GGC runs: 110
comparing PR rtl-optimization/28071 testcase compilation at -O3 -fno-tree-pre -fno-tree-fre level:
Overall memory needed: 781446k -> 781462k
Peak memory use before GGC: 314928k -> 314929k
Peak memory use after GGC: 293272k
Maximum of released memory in single GGC run: 165196k -> 165211k
Garbage: 494379k -> 494413k
Leak: 65522k
Overhead: 59885k -> 59885k
GGC runs: 98
Head of the ChangeLog is:
--- /usr/src/SpecTests/sandbox-britten-memory/x86_64/mem-result/ChangeLog 2006-11-27 02:09:55.000000000 +0000
+++ /usr/src/SpecTests/sandbox-britten-memory/gcc/gcc/ChangeLog 2006-11-27 18:41:58.000000000 +0000
@@ -1,3 +1,145 @@
+2006-11-27 Tobias Burnus <burnus@net-b.de>
+
+ * doc/invoke.texi: Fixed typo.
+
+2006-11-27 Michael Matz <matz@suse.de>
+ Andreas Krebbel <krebbel1@de.ibm.com>
+
+ PR target/29319
+ * config/s390/predicates.md (larl_operand): Check addend of larl
+ operand to be in range of -/+2GB.
+ * config/s390/s390.c (legitimize_pic_address): Likewise.
+ Changed type of variable even to HOST_WIDE_INT.
+
+2006-11-27 Jan Hubicka <jh@suse.cz>
+
+ * expr.c (emit_block_move_via_libcall): Export.
+ (clear_storage_via_libcall): Rename to ...
+ (set_storage_via_libcall): ... this one; handle arbitrary value to set.
+ (clear_storage): Update to set_storage_via_libcall.
+ * expr.h (emit_block_move_via_libcall): Declare
+ * config/i386/i386.h (stringop_alg): New enum.
+ (MAX_STRINGOP_ALGS): New constant.
+ (stringop_algs): New struct.
+ (processor_costs): Add memcpy/memset descriptors.
+ (TARGET_REP_MOVEL_OPTIMAL): Remove.
+ * config/i386/i386.md (movsi_insv_1_rex64): New pattern.
+ (strmovsi, strmovdi, strsetsi, strsetdi): Update; accept all operands
+ for memset.
+ * config/i386/i386.opt (minline-stringops-dynamically,
+ mstringop-strategy): New
+ parameters.
+ * config/i386/i386-prostos.h (ix86_expand_movmem): Update prototype.
+ (ix86_expand-clrmem): Rename to ...
+ (ix86_expand_setmem): ... this one; update prototype.
+ * config/i386/i386.c (DUMMY_STRINGOP_ALGS): New constant.
+ (size_cost, i386_cost, i486_cost, pentium_cost, pentiumpro_cost,
+ geode_cost, k6_cost, athlon_cost, k8_cost, pentium4_cost,
+ nocona_cost, core2_cost, generic_cost, generic64_cost,
+ generic32_cost): Add memcpy/memset descriptors.
+ (x86_rep_movl_optimal): Remove.
+ (stringop_alg): New static variable.
+ (ix86_expand_aligntest): Handle predictions.
+ (override_options): Add strgop_alg handling.
+ (predict_jump): New function.
+ (scale_counter): New function.
+ (expand_set_or_movmem_via_loop): New function.
+ (expand_movmem_via_rep_mov): New function.
+ (expand_setmem_via_rep_stots): New function.
+ (emit_strmov): New function.
+ (expand_movmem_epilogue): New function.
+ (expand_setmem_epilogue_via_loop): New function.
+ (expand_setmem_epilogue): New function.
+ (expand_movmem_prologue): New function.
+ (expand_setmem_prologue): New function.
+ (decide_alg): New function.
+ (decide_alignment): New function.
+ (ix86_exand_movmem): Rewrite.
+ (promote_duplicated_reg): New function.
+ (ix86_expand_clrmem): Rename to ...
+ (ix86_expand_setmem): ... this one. Rewrite.
+
+ * invoke.texi (minline-stringops-dynamically): New command line option.
+ (mstringop-strategy): Likewise.
+
+2006-11-27 Jan Hubicka <jh@suse.cz>
+
+ * cfgexpand.c (construct_exit_block): Don't disturb end of last BB.
+ * rtl.texi (NOTE_INSN_FUNCTION_END): Remove.
+ * final.c (final_scan_insn): Don't scan NOTE_INSN_FUNCTION_END.
+ * insn-notes.def (FUNCTION_END): Remove.
+ * jump.c (delete_related_insns): Don't worry about FUNCTION_END.
+ (redicect_jump_2): Don't accept -1 parameter to remove FUNCTION_END
+ note.
+ * ifcvt.c (dead_or_predictable): Update call of redirect_jump_2.
+ * function.c (expand_function_end): Don't emit NOTE_INSN_FUNCTION_END
+ * cfglayout.c (duplicate_insn_chain): Don't worry about
+ NOTE_FUNCTION_END.
+
+2006-11-27 Richard Guenther <rguenther@suse.de>
+ Zdenek Dvorak <dvorakz@suse.cz>
+
+ * target.h (struct gcc_target): Add builtin_vectorized_function
+ target hook.
+ * target-def.h (TARGET_VECTORIZE): Likewise.
+ * doc/tm.texi (TARGET_VECTORIZE_BUILTIN_VECTORIZED_FUNCTION):
+ Document new target hook.
+ * targhooks.h (default_builtin_vectorized_function): Declare.
+ * targhooks.c (default_builtin_vectorized_function): Define.
+ * tree-vectorizer.h (stmt_vec_info_type): Add call_vec_info_type.
+ (vectorizable_call): Declare.
+ * tree-vect-analyze.c (vect_analyze_operations): Call
+ vectorizable_call.
+ * tree-vect-transform.c (vectorizable_function): New static function.
+ (build_vectorized_function_call): Likewise.
+ (vectorizable_call): New function.
+ (vect_transform_stmt): Handle vectorizable calls.
+
+2006-11-27 Richard Guenther <rguenther@suse.de>
+
+ PR middle-end/25620
+ * builtins.c (expand_builtin_pow): Optimize non integer valued
+ constant exponents using sqrt or cbrt if possible. Always fall back
+ to expanding via optabs.
+
+2006-11-27 Ira Rosen <irar@il.ibm.com>
+
+ PR tree-optimization/22372
+ * tree-vect-transform.c (vect_create_addr_base_for_vector_ref): Convert
+ the type of the base address.
+ (vect_create_data_ref_ptr): Add an argument, type of the data-ref. Use
+ it in the data-ref pointer creation.
+ (vect_init_vector): Add an argument, type of the init vector. Use it in
+ the stmt creation.
+ (vect_get_vec_def_for_operand): Fix calls to vect_init_vector.
+ (get_initial_def_for_reduction): Likewise.
+ (vect_create_epilog_for_reduction): Change type of MODIFY_EXPR to
+ void_type_node.
+ (vectorizable_assignment, vect_permute_store_chain): Likewise.
+ (vectorizable_store): Fix call to vect_create_data_ref_ptr. Use the
+ correct type in stmt creation.
+ (vect_setup_realignment): Use the correct type in stmt creation.
+ (vect_permute_load_chain): Change type of MODIFY_EXPR to
+ void_type_node.
+ (vectorizable_load): Fix calls to vect_create_data_ref_ptr. Change type
+ of MODIFY_EXPR to void_type_node.
+ (vectorizable_condition): Change type of MODIFY_EXPR to
+ void_type_node.
+ (vect_update_ivs_after_vectorizer): Use the correct type in stmt
+ creation.
+
+2006-11-27 Uros Bizjak <ubizjak@gmail.com>
+
+ Revert:
+ 2006-05-08 Uros Bizjak <uros@kss-loka.si>
+ * config/i386/i386.c (ix86_rtx_costs) [FLOAT_EXTEND]: For
+ standard 80387 constants, raise the cost to prevent
+ compress_float_constant() to generate load from memory.
+
+ * config/i386/i386.md: Add new splitter pattern to split
+ float_extended load of constant from constant pool into
+ pure constant load.
+
2006-11-26 Kaveh R. Ghazi <ghazi@caip.rutgers.edu>
* doc/install.texi: Move GMP/MPFR configure options from Fortran
@@ -10,8 +152,8 @@
2006-11-26 Razya Ladklesky <razya@il.ibm.com>
- * testsuite/gcc.dg/ipa/ipa-6.c: New.
-
+ * testsuite/gcc.dg/ipa/ipa-6.c: New.
+
2006-11-26 Razya Ladklesky <razya@il.ibm.com>
PR tree-optimization/29122
@@ -2070,7 +2212,7 @@
2006-11-05 Kaz Kojima <kkojima@gcc.gnu.org>
* config/sh/lib1funcs-4-300.asm: Guard entire file with
- #if !__SHMEDIA__ .
+ #if !__SHMEDIA__ .
2006-11-05 Jakub Jelinek <jakub@redhat.com>
--- /usr/src/SpecTests/sandbox-britten-memory/x86_64/mem-result/ChangeLog.cp 2006-11-22 06:29:50.000000000 +0000
+++ /usr/src/SpecTests/sandbox-britten-memory/gcc/gcc/cp/ChangeLog 2006-11-27 18:41:56.000000000 +0000
@@ -1,3 +1,18 @@
+2006-11-26 Mark Mitchell <mark@codesourcery.com>
+
+ PR c++/29886
+ * parser.c (cp_parser): Add in_function_body.
+ (cp_parser_new): Initialize it.
+ (cp_parser_primary_expression): Use parser->in_function_body
+ instead of at_function_scope_p.
+ (cp_parser_asm_definition): Likewise.
+ (cp_parser_direct_declarator): Likewise.
+ (cp_parser_class_specifier): Clear parser->in_function_body.
+ (cp_parser_constructor_declarator_p): Use parser->in_function_body
+ instead of at_function_scope_p.
+ (cp_parser_function_body_after_declarator): Set
+ parser->in_function_body.
+
2006-11-21 Douglas Gregor <doug.gregor@gmail.com>
* cp-tree.def (STATIC_ASSERT): New.
The results can be reproduced by building a compiler with
--enable-gather-detailed-mem-stats targetting x86-64
and compiling preprocessed combine.c or testcase from PR8632 with:
-fmem-report --param=ggc-min-heapsize=1024 --param=ggc-min-expand=1 -Ox -Q
The memory consumption summary appears in the dump after detailed listing
of the places they are allocated in. Peak memory consumption is actually
computed by looking for maximal value in {GC XXXX -> YYYY} report.
Your testing script.