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: Wed, 13 Jun 2007 00:04:46 +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: 7498k
Peak memory use before GGC: 2354k
Peak memory use after GGC: 2019k
Maximum of released memory in single GGC run: 335k
Garbage: 489k
Leak: 2281k
Overhead: 404k
GGC runs: 3
comparing empty function compilation at -O0 -g level:
Overall memory needed: 7514k
Peak memory use before GGC: 2381k
Peak memory use after GGC: 2046k
Maximum of released memory in single GGC run: 335k
Garbage: 492k
Leak: 2314k
Overhead: 409k
GGC runs: 3
comparing empty function compilation at -O1 level:
Overall memory needed: 7550k
Peak memory use before GGC: 2354k
Peak memory use after GGC: 2019k
Maximum of released memory in single GGC run: 335k
Garbage: 495k
Leak: 2284k
Overhead: 405k
GGC runs: 3
comparing empty function compilation at -O2 level:
Overall memory needed: 7566k
Peak memory use before GGC: 2354k
Peak memory use after GGC: 2019k
Maximum of released memory in single GGC run: 335k
Garbage: 498k
Leak: 2284k
Overhead: 406k
GGC runs: 4
comparing empty function compilation at -O3 level:
Overall memory needed: 7566k
Peak memory use before GGC: 2354k
Peak memory use after GGC: 2019k
Maximum of released memory in single GGC run: 335k
Garbage: 498k
Leak: 2284k
Overhead: 406k
GGC runs: 4
comparing combine.c compilation at -O0 level:
Overall memory needed: 22466k
Peak memory use before GGC: 9039k
Peak memory use after GGC: 8253k
Maximum of released memory in single GGC run: 1595k
Garbage: 38386k
Leak: 6901k
Overhead: 4872k
GGC runs: 280
comparing combine.c compilation at -O0 -g level:
Overall memory needed: 24390k
Peak memory use before GGC: 10776k
Peak memory use after GGC: 10008k
Maximum of released memory in single GGC run: 1891k
Garbage: 38743k
Leak: 9794k
Overhead: 5578k
GGC runs: 272
comparing combine.c compilation at -O1 level:
Overall memory needed: 35306k -> 35314k
Peak memory use before GGC: 17757k -> 17754k
Peak memory use after GGC: 17566k
Maximum of released memory in single GGC run: 1347k
Garbage: 51882k -> 51876k
Leak: 6959k -> 6959k
Overhead: 5990k -> 5987k
GGC runs: 358
comparing combine.c compilation at -O2 level:
Overall memory needed: 37162k -> 37166k
Peak memory use before GGC: 17776k
Peak memory use after GGC: 17580k
Maximum of released memory in single GGC run: 1348k
Garbage: 68621k -> 68610k
Leak: 7075k
Overhead: 8138k -> 8139k
GGC runs: 420 -> 419
comparing combine.c compilation at -O3 level:
Amount of memory still referenced at the end of compilation increased from 7190k to 7199k, overall 0.11%
Overall memory needed: 43630k -> 43634k
Peak memory use before GGC: 17984k
Peak memory use after GGC: 17725k
Maximum of released memory in single GGC run: 3718k
Garbage: 93953k -> 93953k
Leak: 7190k -> 7199k
Overhead: 11423k -> 11424k
GGC runs: 450
comparing insn-attrtab.c compilation at -O0 level:
Overall memory needed: 142086k -> 142090k
Peak memory use before GGC: 59807k
Peak memory use after GGC: 32813k
Maximum of released memory in single GGC run: 34624k
Garbage: 131855k
Leak: 9743k
Overhead: 14266k
GGC runs: 219
comparing insn-attrtab.c compilation at -O0 -g level:
Overall memory needed: 143350k -> 143342k
Peak memory use before GGC: 60969k
Peak memory use after GGC: 33974k
Maximum of released memory in single GGC run: 34625k
Garbage: 132074k
Leak: 11452k
Overhead: 14664k
GGC runs: 216
comparing insn-attrtab.c compilation at -O1 level:
Overall memory needed: 152678k -> 152674k
Peak memory use before GGC: 58039k
Peak memory use after GGC: 53810k
Maximum of released memory in single GGC run: 23626k
Garbage: 215875k
Leak: 9630k
Overhead: 24622k
GGC runs: 247
comparing insn-attrtab.c compilation at -O2 level:
Overall memory needed: 191002k -> 190994k
Peak memory use before GGC: 57918k
Peak memory use after GGC: 53899k
Maximum of released memory in single GGC run: 21313k
Garbage: 248447k
Leak: 9619k
Overhead: 29974k
GGC runs: 271
comparing insn-attrtab.c compilation at -O3 level:
Overall memory needed: 196878k -> 196910k
Peak memory use before GGC: 69167k
Peak memory use after GGC: 64707k
Maximum of released memory in single GGC run: 22927k
Garbage: 277575k
Leak: 9629k
Overhead: 31701k
GGC runs: 274
comparing Gerald's testcase PR8361 compilation at -O0 level:
Overall memory needed: 153825k -> 153720k
Peak memory use before GGC: 89184k -> 89200k
Peak memory use after GGC: 88300k -> 88317k
Maximum of released memory in single GGC run: 18130k -> 18136k
Garbage: 208628k -> 208662k
Leak: 51075k
Overhead: 24095k -> 24098k
GGC runs: 410
comparing Gerald's testcase PR8361 compilation at -O0 -g level:
Overall memory needed: 174169k -> 174192k
Peak memory use before GGC: 101740k -> 101757k
Peak memory use after GGC: 100733k -> 100749k
Maximum of released memory in single GGC run: 18433k -> 18440k
Garbage: 214318k -> 214352k
Leak: 74384k
Overhead: 29991k -> 29993k
GGC runs: 382
comparing Gerald's testcase PR8361 compilation at -O1 level:
Overall memory needed: 150321k -> 150304k
Peak memory use before GGC: 100479k -> 100476k
Peak memory use after GGC: 99482k -> 99478k
Maximum of released memory in single GGC run: 17444k -> 17451k
Garbage: 339928k -> 339963k
Leak: 51659k -> 51668k
Overhead: 31026k -> 31031k
GGC runs: 528
comparing Gerald's testcase PR8361 compilation at -O2 level:
Overall memory needed: 157237k -> 157372k
Peak memory use before GGC: 100744k -> 100782k
Peak memory use after GGC: 99746k -> 99772k
Maximum of released memory in single GGC run: 17444k -> 17453k
Garbage: 387661k -> 388032k
Leak: 52369k -> 52367k
Overhead: 36613k -> 36640k
GGC runs: 580 -> 578
comparing Gerald's testcase PR8361 compilation at -O3 level:
Amount of produced GGC garbage increased from 420006k to 420817k, overall 0.19%
Overall memory needed: 159505k -> 159560k
Peak memory use before GGC: 102445k -> 102467k
Peak memory use after GGC: 101421k -> 101452k
Maximum of released memory in single GGC run: 17899k -> 17888k
Garbage: 420006k -> 420817k
Leak: 52974k -> 52977k
Overhead: 39068k -> 39145k
GGC runs: 602 -> 601
comparing PR rtl-optimization/28071 testcase compilation at -O0 level:
Overall memory needed: 386593k -> 386592k
Peak memory use before GGC: 102418k
Peak memory use after GGC: 58071k
Maximum of released memory in single GGC run: 50583k
Garbage: 179454k
Leak: 7439k
Overhead: 30910k
GGC runs: 76
comparing PR rtl-optimization/28071 testcase compilation at -O0 -g level:
Overall memory needed: 387393k -> 387392k
Peak memory use before GGC: 103064k
Peak memory use after GGC: 58718k
Maximum of released memory in single GGC run: 50582k
Garbage: 179559k
Leak: 9207k
Overhead: 31406k
GGC runs: 84
comparing PR rtl-optimization/28071 testcase compilation at -O1 level:
Overall memory needed: 306614k -> 306630k
Peak memory use before GGC: 83382k
Peak memory use after GGC: 74918k
Maximum of released memory in single GGC run: 39402k
Garbage: 232577k
Leak: 20874k
Overhead: 31739k
GGC runs: 81
comparing PR rtl-optimization/28071 testcase compilation at -O2 level:
Overall memory needed: 319334k -> 319258k
Peak memory use before GGC: 79905k
Peak memory use after GGC: 74919k
Maximum of released memory in single GGC run: 33014k
Garbage: 240437k
Leak: 20953k
Overhead: 33974k
GGC runs: 92
comparing PR rtl-optimization/28071 testcase compilation at -O3 -fno-tree-pre -fno-tree-fre level:
Overall memory needed: 1031406k
Peak memory use before GGC: 183659k
Peak memory use after GGC: 171174k
Maximum of released memory in single GGC run: 80733k
Garbage: 348765k
Leak: 46332k
Overhead: 44720k
GGC runs: 75
Head of the ChangeLog is:
--- /usr/src/SpecTests/sandbox-britten-memory/x86_64/mem-result/ChangeLog 2007-06-12 05:18:14.000000000 +0000
+++ /usr/src/SpecTests/sandbox-britten-memory/gcc/gcc/ChangeLog 2007-06-12 21:56:44.000000000 +0000
@@ -1,3 +1,167 @@
+2007-06-12 Seongbae Park <seongbae.park@gmail.com>
+
+ * df-scan.c (df_get_exit-block_use_set): Always add the stack pointer
+ to the exit block use set.
+ * gcse.c (cpro_jump): Don't emit barrier in cfglayout mode.
+ * config/sparc/sparc.c (sparc_check_64): Check df != NULL.
+
+2007-06-12 Seongbae Park <seongbae.park@gmail.com>
+
+ * opts.c (common_handle_option): Handle new option -fdbg-cnt-list.
+ * dbgcnt.c (dbg_cnt_set_limit_by_name): Return value
+ to indicate an error.
+ (dbg_cnt_process_single_pair, dbg_cnt_list_all_counters): New functions
+ (dbg_cnt_process_opt): Print an error on a bad argument.
+ * dbgcnt.h (dbg_cnt_list_all_counters): New function declaration.
+ * common.opt (-fdbg-cnt-list): New.
+ * doc/invoke.texi (-fdbg-cnt-list,-fdbg-cnt=): New.
+
+2007-06-12 Eric Botcazou <ebotcazou@adacore.com>
+
+ * tree-ssa-alias.c (finalize_ref_all_pointers): Clear pt_anything
+ flag on ref-all pointers.
+
+2007-06-12 Andrew Pinski <andrew_pinski@playstation.sony.com>
+
+ PR middle-end/31579
+ * expr.c (expand_expr_addr_expr_1): Call expand_expr
+ for the offset with the modifier as EXPAND_INITIALIZER
+ if the modifier is EXPAND_INITIALIZER.
+ (expand_expr_real_1 <case INTEGER_CST>): Don't force to
+ a register if we had an overflow.
+
+2007-06-12 Kaveh R. Ghazi <ghazi@caip.rutgers.edu>
+
+ * real.c (real_isfinite): New.
+ (real_sqrt): Use it.
+ * real.h (real_isfinite): New.
+ * builtins.c: Use it.
+
+2007-06-12 Ian Lance Taylor <iant@google.com>
+ Daniel Berlin <dberlin@dberlin.org>
+
+ PR libstdc++/29286
+ * tree.def: Add CHANGE_DYNAMIC_TYPE_EXPR.
+ * tree.h (CHANGE_DYNAMIC_TYPE_NEW_TYPE): Define.
+ (CHANGE_DYNAMIC_TYPE_LOCATION): Define.
+ (DECL_NO_TBAA_P): Define.
+ (struct tree_decl_common): Add no_tbaa_flag field.
+ * tree-ssa-structalias.c (struct variable_info): Add
+ no_tbaa_pruning field.
+ (new_var_info): Initialize no_tbaa_pruning field.
+ (unify_nodes): Copy no_tbaa_pruning field.
+ (find_func_aliases): Handle CHANGE_DYNAMIC_TYPE_EXPR.
+ (dump_solution_for_var): Print no_tbaa_pruning flag.
+ (set_uids_in_ptset): Add no_tbaa_pruning parameter. Change all
+ callers.
+ (compute_tbaa_pruning): New static function.
+ (compute_points_to_sets): Remove CHANGE_DYNAMIC_TYPE_EXPR nodes.
+ Call compute_tbaa_pruning.
+ * tree-ssa-alias.c (may_alias_p): Test no_tbaa_flag for pointers.
+ * gimplify.c (gimplify_expr): Handle CHANGE_DYNAMIC_TYPE_EXPR.
+ * gimple-low.c (lower_stmt): Likewise.
+ * tree-gimple.c (is_gimple_stmt): Likewise.
+ * tree-ssa-operands.c (get_expr_operands): Likewise.
+ * tree-ssa-dce.c (mark_stmt_if_obviously_necessary): Likewise.
+ * tree-inline.c (estimate_num_insns_1): Likewise.
+ (copy_result_decl_to_var): Likewise.
+ * expr.c (expand_expr_real_1): Likewise.
+ * tree-pretty-print.c (dump_generic_node): Likewise.
+ * tree-inline.c (copy_decl_to_var): Copy DECL_NO_TBAA_P flag.
+ * omp-low.c (omp_copy_decl_2): Likewise.
+ * print-tree.c (print_node): Print DECL_NO_TBAA_P flag.
+ * doc/c-tree.texi (Expression trees): Document
+ CHANGE_DYNAMIC_TYPE_EXPR.
+
+2007-06-12 Kaveh R. Ghazi <ghazi@caip.rutgers.edu>
+
+ * fold-const.c (fold_binary): Guard (X-X) -> 0 transformation
+ with !HONOR_NANS and !HONOR_INFINITIES.
+ * simplify-rtx.c (simplify_binary_operation_1): Likewise.
+
+2007-06-12 Tristan Gingold <gingold@adacore.com>
+
+ * gcov.c: Comments updated.
+ (source_info): Add file_time field.
+ (source_index): New variable.
+ (mutiple_files): New variable.
+ (generate_results): New function extracted from process_file.
+ (process_file): Save and restore chain of functions, generate
+ results and free structures only if not merging results.
+ (release_structures): File names are now freed in create_file_names
+ (create_file_names): Free previous file names.
+ (find_source): File date is now read here and modifications in
+ source files is checked here.
+ (read_graph_file): Only reverse order of functions for the current
+ object file.
+ (make_gcov_file_name): Do not generate long names if input_name is
+ NULL.
+ (output_lines): If merging results do not display graph, data and
+ runs informations.
+ Checking source file modification is done in find_source.
+
+ * doc/gcov.texi: Append an s to sourcefile.
+
+2007-06-12 Bernd Schmidt <bernd.schmidt@analog.com>
+
+ * config/bfin/bfin.md (UNSPEC_NOP): New constant.
+ (forced_nop): New pattern.
+ * config/bfin/bfin.c: Include "df.h".
+ (add_to_reg): Use df_regs_ever_live_p instead of regs_ever_live.
+ (bfin_discover_loop): Use df_get_live_in instead of
+ global_live_at_start.
+ (bfin_reorder_loops): Pass 0 to cfg_layout_initialize. Call
+ df_analyze when done.
+ (gen_one_bundle): Don't generate SEQUENCE insns, just put modes on
+ the insns. Use QImode for the final insn in a bundle. Call
+ df_insn_rescan on generated NOPs; use gen_forced_nop instead of
+ gen_nop.
+ (reorder_var_tracking_notes): New function.
+ (bfin_reorg): Pass no argument to split_all_insns. Don't call
+ update_life_info. Call df_analyze after scheduling and bundle
+ generation. Call reorder_var_tracking_notes if generating these notes.
+ Call df_finish_pass at the end.
+
+2007-06-12 Dirk Mueller <dmueller@suse.de>
+
+ * optabs.c (debug_optab_libfuncs): fix gcc_assert to
+ a comparison, not an assignment.
+
+2007-06-12 Olivier Hainque <hainque@adacore.com>
+
+ * tree-nested.c (convert_local_reference): Handle VIEW_CONVERT_EXPR.
+ Request walking the subtrees only, leaving the current is_lhs/val_only
+ untouched.
+ (convert_non_local_reference): Likewise.
+
+2007-06-12 Nathan Sidwell <nathan@codesourcery.com>
+
+ * config/m68k/m68k-devices.def (52221, 52223, 5253): New.
+
+2007-06-12 Richard Guenther <rguenther@suse.de>
+
+ PR tree-optimization/15353
+ PR tree-optimization/31657
+ * passes.c (init_optimization_passes): Add pass_tree_ifcombine.
+ * timevar.def: Add TV_TREE_IFCOMBINE.
+ * tree-pass.h (pass_tree_ifcombine): Declare.
+ * tree-ssa-ifcombine.c: New file.
+ * tree-ssa-phiopt.c (blocks_in_phiopt_order): Export.
+ * tree-flow.h (blocks_in_phiopt_order): Declare.
+ * Makefile.in (OBJS-common): Add tree-ssa-ifcombine.o.
+ (tree-ssa-ifcombine.o): New dependencies.
+
+2007-06-12 Uros Bizjak <ubizjak@gmail.com>
+
+ PR rtl-optimization/32293
+ * combine.c (simplify_if_then_else): Truncate return from
+ nonzero_bits() to correct mode.
+
+2007-06-12 Uros Bizjak <ubizjak@gmail.com>
+
+ * fold-const (fold_binary) [RDIV_EXPR]: Also optimize a/cbrt(b/c)
+ into a*cbrt(c/b) if flag_unsafe_math_optimizations is set.
+
2007-06-11 Diego Novillo <dnovillo@google.com>
* Makefile.in (reload1.o-warn): Remove.
--- /usr/src/SpecTests/sandbox-britten-memory/x86_64/mem-result/ChangeLog.cp 2007-06-11 13:11:49.000000000 +0000
+++ /usr/src/SpecTests/sandbox-britten-memory/gcc/gcc/cp/ChangeLog 2007-06-12 21:56:40.000000000 +0000
@@ -1,3 +1,9 @@
+2007-06-12 Ian Lance Taylor <iant@google.com>
+
+ PR libstdc++/29286
+ * init.c (avoid_placement_new_aliasing): New static function.
+ (build_new_1): Call it.
+
2007-06-11 Rafael Avila de Espindola <espindola@google.com>
* cp-objcp-common.h (LANG_HOOKS_SIGNED_TYPE): Remove.
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.