This is the mail archive of the
gcc-regression@gcc.gnu.org
mailing list for the GCC project.
GCC memory consumption increased by recent patch!
- From: gcctest at suse dot de
- To: jh at suse dot cz, gcc-regression at gcc dot gnu dot org
- Date: Sun, 05 Sep 2004 13:27:36 +0000
- Subject: GCC memory consumption increased by recent patch!
Hi,
Comparing memory consumption on compilation of combine.i and generate-3.4.ii I got:
comparing combine.c compilation at -O0 level:
Peak memory use before GGC: 12120k -> 12120k
Peak memory use after GGC: 11641k -> 11641k
Maximum of released memory in single GGC run: 2368k -> 2368k
Garbage: 42976k -> 42976k
Leak: 10910k -> 10910k
Overhead: 5810k -> 5810k
GGC runs: 447 -> 447
comparing combine.c compilation at -O1 level:
Peak amount of GGC memory allocated before garbage collecting increased from 11101k to 11131k, overall 0.27%
Peak amount of GGC memory still allocated after garbage collectin increased from 10424k to 10454k, overall 0.29%
Amount of produced GGC garbage increased from 79689k to 86850k, overall 8.99%
Amount of memory still referenced at the end of compilation increased from 9880k to 10005k, overall 1.26%
Peak memory use before GGC: 11101k -> 11131k
Peak memory use after GGC: 10424k -> 10454k
Maximum of released memory in single GGC run: 1726k -> 1767k
Garbage: 79689k -> 86850k
Leak: 10005k -> 9880k
Overhead: 13224k -> 14989k
GGC runs: 655 -> 668
comparing combine.c compilation at -O2 level:
Peak amount of GGC memory allocated before garbage collecting increased from 13545k to 13613k, overall 0.50%
Amount of produced GGC garbage increased from 95694k to 102943k, overall 7.58%
Amount of memory still referenced at the end of compilation increased from 9922k to 10025k, overall 1.04%
Peak memory use before GGC: 13545k -> 13613k
Peak memory use after GGC: 13160k -> 13160k
Maximum of released memory in single GGC run: 2103k -> 2104k
Garbage: 95694k -> 102943k
Leak: 10025k -> 9922k
Overhead: 18928k -> 19886k
GGC runs: 665 -> 673
comparing combine.c compilation at -O3 level:
Peak amount of GGC memory allocated before garbage collecting increased from 17431k to 17554k, overall 0.71%
Peak amount of GGC memory still allocated after garbage collectin increased from 15406k to 15529k, overall 0.80%
Amount of produced GGC garbage increased from 124342k to 135722k, overall 9.15%
Amount of memory still referenced at the end of compilation increased from 12005k to 12211k, overall 1.72%
Peak memory use before GGC: 17431k -> 17554k
Peak memory use after GGC: 15406k -> 15529k
Maximum of released memory in single GGC run: 3010k -> 3047k
Garbage: 124342k -> 135722k
Leak: 12211k -> 12005k
Overhead: 26002k -> 26200k
GGC runs: 721 -> 727
comparing Gerald's testcase PR8361 compilation at -O0 level:
Peak memory use before GGC: 93183k -> 93183k
Peak memory use after GGC: 91694k -> 91694k
Maximum of released memory in single GGC run: 20289k -> 20289k
Garbage: 255124k -> 255124k
Leak: 72853k -> 72853k
Overhead: 34609k -> 34609k
GGC runs: 538 -> 538
comparing Gerald's testcase PR8361 compilation at -O1 level:
Amount of produced GGC garbage increased from 624678k to 675502k, overall 8.14%
Amount of memory still referenced at the end of compilation increased from 88861k to 90181k, overall 1.49%
Peak memory use before GGC: 97174k -> 97174k
Peak memory use after GGC: 90561k -> 90561k
Maximum of released memory in single GGC run: 19488k -> 19488k
Garbage: 624678k -> 675502k
Leak: 90181k -> 88861k
Overhead: 142560k -> 147559k
GGC runs: 792 -> 820
comparing Gerald's testcase PR8361 compilation at -O2 level:
Amount of produced GGC garbage increased from 690390k to 742184k, overall 7.50%
Amount of memory still referenced at the end of compilation increased from 87885k to 89222k, overall 1.52%
Peak memory use before GGC: 97175k -> 97175k
Peak memory use after GGC: 90562k -> 90562k
Maximum of released memory in single GGC run: 19489k -> 19489k
Garbage: 690390k -> 742184k
Leak: 89222k -> 87885k
Overhead: 165700k -> 170323k
GGC runs: 840 -> 867
comparing Gerald's testcase PR8361 compilation at -O3 level:
Amount of produced GGC garbage increased from 729959k to 793516k, overall 8.71%
Amount of memory still referenced at the end of compilation increased from 89010k to 90657k, overall 1.85%
Peak memory use before GGC: 92864k -> 92864k
Peak memory use after GGC: 91396k -> 91396k
Maximum of released memory in single GGC run: 20194k -> 20194k
Garbage: 729959k -> 793516k
Leak: 90657k -> 89010k
Overhead: 184792k -> 185145k
GGC runs: 846 -> 866
Head of changelog is:
--- /usr/src/SpecTests/sandbox-britten-memory/x86_64/mem-result/ChangeLog 2004-09-05 03:25:24.000000000 +0000
+++ /usr/src/SpecTests/sandbox-britten-memory/gcc/gcc/ChangeLog 2004-09-05 12:55:23.000000000 +0000
@@ -1,3 +1,63 @@
+2004-09-05 Diego Novillo <dnovillo@redhat.com>
+
+ * tree-if-conv.c (gate_tree_if_conversion): Enable only if the
+ vectorizer is enabled.
+
+2004-09-05 Andreas Jaeger <aj@suse.de>
+
+ * tree-if-conv.c: Spell check comments and clean up whitespace.
+
+2004-09-05 Zdenek Dvorak <rakdver@atrey.karlin.mff.cuni.cz>
+
+ * tree-ssa-loop-ivopts.c: New file.
+ * Makefile.in (tree-ssa-loop-ivopts.c): Add.
+ * cfgloop.h (target_avail_regs, target_res_regs, target_small_cost,
+ target_pres_cost, target_spill_cost): Declare.
+ * cfgloopanal.c (avail_regs, res_regs, small_cost, pres_cost,
+ spill_cost): Renamed to ...
+ (target_avail_regs, target_res_regs, target_small_cost,
+ target_pres_cost, target_spill_cost): ... and exported.
+ (init_set_costs, global_cost_for_size): Work with renamed variables.
+ * common.opt (flag_ivopts): New flag.
+ * expr.c (expand_expr_real_1): Handle SSA_NAME case. Handle
+ REF_ORIGINAL.
+ * gimplify.c (struct gimplify_ctx): Add into_ssa field.
+ (internal_get_tmp_var, gimplify_modify_expr, gimplify_expr): Support
+ generating SSA form.
+ (force_gimple_operand): New function.
+ * timevar.def (TV_TREE_LOOP_IVOPTS): New timevar.
+ * tree-cfg.c (stmt_bsi): New function.
+ * params.def (PARAM_IV_CONSIDER_ALL_CANDIDATES_BOUND,
+ PARAM_IV_MAX_CONSIDERED_USES): New.
+ * tree-flow.h (stmt_bsi, tree_ssa_iv_optimize, split_loop_exit_edge,
+ bsi_insert_on_edge_immediate_loop. standard_iv_increment_position,
+ ip_end_pos, ip_normal_pos, force_gimple_operand): Declare.
+ * tree-gimple.c (is_gimple_formal_tmp_var): Accept ssa names.
+ * tree-nested.c (build_addr): Export.
+ * tree-optimize.c (init_tree_optimization_passes): Add
+ pass_iv_optimize.
+ * tree-pass.h (pass_iv_optimize): Declare.
+ * tree-ssa-loop-im.c (for_each_index): Handle REALPART_EXPR and
+ IMAGPART_EXPR.
+ * tree-ssa-loop-manip.c (create_iv): Force the base to be acceptable
+ as a phi node argument.
+ (split_loop_exit_edge, bsi_insert_on_edge_immediate_loop,
+ ip_end_pos, ip_normal_pos, standard_iv_increment_position): New
+ functions.
+ * tree-ssa-loop-niter.c (zero_p, unsigned_type_for): Export.
+ * tree-ssa-loop.c (tree_ssa_loop_ivopts, gate_tree_ssa_loop_ivopts,
+ pass_iv_optimize): New pass.
+ * tree-ssa-operands.c (get_indirect_ref_operands): Handle REF_ORIGINAL.
+ * tree-ssanames.c (release_ssa_name): Allow calling with var = NULL.
+ * tree.c (build_int_cst_type, cst_and_fits_in_hwi): New functions.
+ * tree.h (REF_ORIGINAL): New macro.
+ (build_int_cst_type, unsigned_type_for, zero_p,
+ cst_and_fits_in_hwi, build_addr): Declare.
+ * doc/invoke.texi (-fivopts): Document.
+ (PARAM_IV_CONSIDER_ALL_CANDIDATES_BOUND,
+ PARAM_IV_MAX_CONSIDERED_USES): Document.
+ * doc/passes.texi: Document induction variable optimizations pass.
+
2004-09-04 Kaveh R. Ghazi <ghazi@caip.rutgers.edu>
* builtin-attrs.def (ATTR_NOTHROW_SENTINEL_1): New.
@@ -102,7 +162,7 @@
Handle new rounding modes.
* config/i386/i386.h (enum fp_cw_mode): Delete.
- (MODE_NEEDED): Handle new rounding modes.
+ (MODE_NEEDED): Handle new rounding modes.
(EMIT_MODE_SET): Change condition to handle new rounding modes.
* config/i386/i386.md (UNSPEC_FRNDINT_FLOOR, UNSPEC_FRNDINT_CEIL,
@@ -167,7 +227,7 @@
* tree-ssa-operands.c (get_expr_operands): Handle COND_EXPR.
* tree-if-conv.c: New file.
* doc/passes.texi: Document tree if-conversion pass.
- * doc/tree-ssa.texi: Same.
+ * doc/tree-ssa.texi: Same.
2004-09-03 H.J. Lu <hongjiu.lu@intel.com>
@@ -389,7 +449,7 @@
2004-09-03 Devang Patel <dpatel@apple.com>
* dwarf2out.c (gen_field_die). Equate decl number to die.
-
+
2004-09-03 Vladimir Makarov <vmakarov@redhat.com>
PR target/15832
@@ -417,7 +477,7 @@
* tsystem.h: Declare memcpy and memset when inhibit_libc.
2004-09-02 Roman Zippel <zippel@linux-m68k.org>
-
+
* combine.c (try_combine): Delay modifying of insns which cannot
be easily undone.
@@ -449,7 +509,7 @@
TARGET_BPABI_CPP_BUILTINS.
2004-09-02 Roman Zippel <zippel@linux-m68k.org>
-
+
* combine.c (distribute_notes): Don't add REG_LABEL to jump insn.
2004-09-02 Eric Christopher <echristo@redhat.com>
@@ -7091,7 +7151,7 @@
(mover2side, moverside, movemside, movei, op3, andu): Replace
live define_peephole:s with define_peephole2 near-equivalents.
Delete the rest.
- ("*mov_sidesisf_biap"): Rename from "*mov_sidesi_biap". Match all
+ ("*mov_sidesisf_biap"): Rename from "*mov_sidesi_biap". Match all
word-size modes.
("*mov_sidesisf", "*mov_sidesisf_biap_mem", "*mov_sidesisf_mem"):
Similar for "*mov_sidesi", "*mov_sidesi_biap_mem" and
I am friendly script caring about memory consumption in GCC. Please contact
jh@suse.cz if something is going wrong.
The results can be reproduced by building 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.
Yours testing script.