A recent patch increased GCC's memory consumption!
gcctest@suse.de
gcctest@suse.de
Wed Nov 30 12:49:00 GMT 2005
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 combine.c compilation at -O0 level:
Overall memory needed: 24917k
Peak memory use before GGC: 9599k
Peak memory use after GGC: 8946k
Maximum of released memory in single GGC run: 2736k
Garbage: 40102k -> 40098k
Leak: 6709k
Overhead: 5790k -> 5789k
GGC runs: 317
comparing combine.c compilation at -O1 level:
Amount of produced GGC garbage increased from 60764k to 60836k, overall 0.12%
Overall memory needed: 26824k
Peak memory use before GGC: 17367k
Peak memory use after GGC: 17184k
Maximum of released memory in single GGC run: 2372k -> 2373k
Garbage: 60764k -> 60836k
Leak: 6892k -> 6890k
Overhead: 7583k -> 7637k
GGC runs: 388
comparing combine.c compilation at -O2 level:
Overall memory needed: 26824k
Peak memory use before GGC: 17370k
Peak memory use after GGC: 17184k
Maximum of released memory in single GGC run: 2453k
Garbage: 77549k -> 77578k
Leak: 6977k -> 6977k
Overhead: 10025k -> 10054k
GGC runs: 457
comparing combine.c compilation at -O3 level:
Overall memory needed: 26824k
Peak memory use before GGC: 18368k -> 18370k
Peak memory use after GGC: 17999k -> 18000k
Maximum of released memory in single GGC run: 3509k -> 3513k
Garbage: 107992k -> 108076k
Leak: 7050k -> 7034k
Overhead: 13567k -> 13588k
GGC runs: 509 -> 508
comparing insn-attrtab.c compilation at -O0 level:
Overall memory needed: 80928k
Peak memory use before GGC: 69473k
Peak memory use after GGC: 45011k
Maximum of released memory in single GGC run: 36247k
Garbage: 146440k
Leak: 10101k
Overhead: 19797k
GGC runs: 251
comparing insn-attrtab.c compilation at -O1 level:
Overall memory needed: 112104k -> 112108k
Peak memory use before GGC: 94461k
Peak memory use after GGC: 83560k
Maximum of released memory in single GGC run: 32588k
Garbage: 296221k -> 296187k
Leak: 10079k
Overhead: 36758k -> 36751k
GGC runs: 247
comparing insn-attrtab.c compilation at -O2 level:
Overall memory needed: 125652k -> 125656k
Peak memory use before GGC: 111817k -> 111820k
Peak memory use after GGC: 83476k -> 83479k
Maximum of released memory in single GGC run: 32177k
Garbage: 381065k -> 381027k
Leak: 10180k
Overhead: 48269k -> 48262k
GGC runs: 274
comparing insn-attrtab.c compilation at -O3 level:
Overall memory needed: 125696k -> 125700k
Peak memory use before GGC: 111841k -> 111839k
Peak memory use after GGC: 83498k
Maximum of released memory in single GGC run: 32501k -> 32502k
Garbage: 381680k -> 381639k
Leak: 10185k
Overhead: 48424k -> 48414k
GGC runs: 278 -> 277
comparing Gerald's testcase PR8361 compilation at -O0 level:
Overall memory needed: 118392k
Peak memory use before GGC: 95142k
Peak memory use after GGC: 94194k
Maximum of released memory in single GGC run: 20460k
Garbage: 223578k
Leak: 49201k
Overhead: 36724k
GGC runs: 369
comparing Gerald's testcase PR8361 compilation at -O1 level:
Overall memory needed: 105524k -> 105536k
Peak memory use before GGC: 95271k
Peak memory use after GGC: 93196k
Maximum of released memory in single GGC run: 20343k
Garbage: 566909k -> 566916k
Leak: 55031k
Overhead: 67485k -> 67492k
GGC runs: 519
comparing Gerald's testcase PR8361 compilation at -O2 level:
Overall memory needed: 106152k -> 106164k
Peak memory use before GGC: 95271k
Peak memory use after GGC: 93197k
Maximum of released memory in single GGC run: 20342k
Garbage: 652019k -> 652030k
Leak: 55803k -> 55804k
Overhead: 78891k -> 78902k
GGC runs: 586
comparing Gerald's testcase PR8361 compilation at -O3 level:
Overall memory needed: 109300k -> 109316k
Peak memory use before GGC: 96739k
Peak memory use after GGC: 94274k
Maximum of released memory in single GGC run: 20839k
Garbage: 709510k -> 709540k
Leak: 57048k -> 57049k
Overhead: 83755k -> 83763k
GGC runs: 592 -> 594
Head of the ChangeLog is:
--- /usr/src/SpecTests/sandbox-britten-memory/x86_64/mem-result/ChangeLog 2005-11-30 01:22:14.000000000 +0000
+++ /usr/src/SpecTests/sandbox-britten-memory/gcc/gcc/ChangeLog 2005-11-30 11:39:29.000000000 +0000
@@ -1,3 +1,48 @@
+2005-11-30 Nathan Sidwell <nathan@codesourcery.com>
+
+ * loop-doloop.c (add_test): Only add jump notes if we did emit a
+ jump.
+
+2005-11-30 Jeff Law <law@redhat.com>
+
+ * tree-ssa-uncprop.c (associate_equivalences_with_edges): Properly
+ handle SSA_NAME_OCCURS_IN_ABNORMAL_PHI.
+
+2005-11-30 Jakub Jelinek <jakub@redhat.com>
+
+ * config/ia64/ia64.c (ia64_expand_tls_address): Add ORIG_OP1 argument.
+ Move ADDEND_{HI,LO} computation into TLS_MODEL_INITIAL_EXEC case.
+ (ia64_expand_move): Adjust caller.
+
+ * config/ia64/ia64.c (ia64_expand_atomic_op): Only use
+ fetchadd{4,8}.acq instruction if CODE is PLUS or MINUS, for MINUS
+ negate VAL.
+
+2005-11-30 Paolo Bonzini <bonzini@gnu.org>
+
+ * simplify-rtx.c (simplify_plus_minus): Remove final parameter.
+ Always produce an output if we can remove NEGs or canonicalize
+ (minus (minus ...)) expressions. Provide a fast path for the
+ two-operand case.
+ (simplify_gen_binary): Do not call simplify_plus_minus.
+ (simplify_binary_operation_1): Reassociate at the end of the
+ function.
+
+2005-11-29 Evan Cheng <evan.cheng@apple.com>
+
+ * config/i386/xmmintrin.h (_MM_TRANSPOSE4_PS): Rewrite using high/low
+ moves and unpack to speed up.
+
+2005-11-29 David S. Miller <davem@sunset.davemloft.net>
+
+ * config/sparc/sparc.c (gen_compare_reg): Kill 2nd and 3rd
+ argument, they are always sparc_compare_op0 and sparc_compare_op1.
+ (gen_v9_scc): Update callers.
+ * config/sparc/sparc.md: Likewise.
+ * config/sparc/sparc-protos.h: Update extern declaration.
+
+ * tree-into-ssa.c (rewrite_into_ssa): Fix comment typo.
+
2005-11-29 Andrew Pinski <pinskia@physics.uc.edu>
* fold-const.c (negate_expr) <case BIT_NOT_EXPR>: Add break after
@@ -99,7 +144,7 @@
Uros Bizjak <uros@kss-loka.si>
PR middle-end/20219
- * fold-const.c (fold binary) <RDIV_EXPR>: Optimize
+ * fold-const.c (fold binary) <RDIV_EXPR>: Optimize
sin(x)/tan(x) as cos(x) and tan(x)/sin(x) as 1.0/cos(x)
when flag_unsafe_math_optimizations is set and
we don't care about NaNs or Infinities.
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.
More information about the Gcc-regression
mailing list