This is the mail archive of the
gcc-regression@gcc.gnu.org
mailing list for the GCC project.
A recent patch decreased 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: Thu, 28 Jul 2005 08:13:50 +0000
- Subject: A recent patch decreased 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 combine.c compilation at -O0 level:
Ovarall memory allocated via mmap and sbrk decreased from 24789k to 23769k, overall -4.29%
Overall memory needed: 24789k -> 23769k
Peak memory use before GGC: 9590k
Peak memory use after GGC: 8937k
Maximum of released memory in single GGC run: 2754k
Garbage: 41361k
Leak: 6690k
Overhead: 5813k
GGC runs: 320
comparing combine.c compilation at -O1 level:
Overall memory needed: 26812k
Peak memory use before GGC: 17362k
Peak memory use after GGC: 17173k
Maximum of released memory in single GGC run: 2402k
Garbage: 66361k
Leak: 7195k
Overhead: 7737k
GGC runs: 415
comparing combine.c compilation at -O2 level:
Overall memory needed: 26812k
Peak memory use before GGC: 17365k
Peak memory use after GGC: 17173k
Maximum of released memory in single GGC run: 2504k
Garbage: 84487k
Leak: 7436k
Overhead: 10280k
GGC runs: 481
comparing combine.c compilation at -O3 level:
Overall memory needed: 26812k
Peak memory use before GGC: 17616k
Peak memory use after GGC: 17173k
Maximum of released memory in single GGC run: 3353k
Garbage: 115530k
Leak: 7506k
Overhead: 13498k
GGC runs: 535
comparing insn-attrtab.c compilation at -O0 level:
Overall memory needed: 81648k
Peak memory use before GGC: 70263k
Peak memory use after GGC: 45002k
Maximum of released memory in single GGC run: 37047k
Garbage: 148647k
Leak: 10091k
Overhead: 19857k
GGC runs: 250
comparing insn-attrtab.c compilation at -O1 level:
Overall memory needed: 112156k -> 112552k
Peak memory use before GGC: 94389k
Peak memory use after GGC: 83710k
Maximum of released memory in single GGC run: 32776k
Garbage: 294413k
Leak: 10080k
Overhead: 36804k
GGC runs: 250
comparing insn-attrtab.c compilation at -O2 level:
Overall memory needed: 123336k -> 123328k
Peak memory use before GGC: 113436k
Peak memory use after GGC: 83674k
Maximum of released memory in single GGC run: 32461k
Garbage: 380610k
Leak: 10194k
Overhead: 48618k
GGC runs: 279
comparing insn-attrtab.c compilation at -O3 level:
Overall memory needed: 123352k -> 123336k
Peak memory use before GGC: 113461k
Peak memory use after GGC: 83698k
Maximum of released memory in single GGC run: 32776k
Garbage: 381139k
Leak: 10210k
Overhead: 48672k
GGC runs: 282
comparing Gerald's testcase PR8361 compilation at -O0 level:
Overall memory needed: 118616k
Peak memory use before GGC: 95321k
Peak memory use after GGC: 94374k
Maximum of released memory in single GGC run: 20159k
Garbage: 227542k
Leak: 49361k
Overhead: 36908k
GGC runs: 344
comparing Gerald's testcase PR8361 compilation at -O1 level:
Overall memory needed: 105532k
Peak memory use before GGC: 94274k
Peak memory use after GGC: 93338k
Maximum of released memory in single GGC run: 19336k
Garbage: 599427k
Leak: 55582k
Overhead: 67698k
GGC runs: 524
comparing Gerald's testcase PR8361 compilation at -O2 level:
Overall memory needed: 105544k
Peak memory use before GGC: 94274k
Peak memory use after GGC: 93339k
Maximum of released memory in single GGC run: 19336k
Garbage: 681537k
Leak: 56195k
Overhead: 78768k
GGC runs: 587
comparing Gerald's testcase PR8361 compilation at -O3 level:
Overall memory needed: 108356k
Peak memory use before GGC: 95464k
Peak memory use after GGC: 94518k
Maximum of released memory in single GGC run: 19608k
Garbage: 727612k
Leak: 56743k
Overhead: 82371k
GGC runs: 596
Head of the ChangeLog is:
--- /usr/src/SpecTests/sandbox-britten-memory/x86_64/mem-result/ChangeLog 2005-07-27 21:42:32.000000000 +0000
+++ /usr/src/SpecTests/sandbox-britten-memory/gcc/gcc/ChangeLog 2005-07-28 07:08:37.000000000 +0000
@@ -1,3 +1,108 @@
+2005-07-28 Jan Beulich <jbeulich@novell.com>
+
+ * config/ia64/ia64.c (ia64_load_pair_ok): New.
+ (ia64_print_operand): Describe and handle 'X'.
+ (ia64_register_move_cost): Also handle FP_REGS.
+ (ia64_preferred_reload_class): Likewise.
+ (ia64_secondary_reload_class): Likewise.
+ (ia64_dependencies_evaluation_hook): New local variable c. Initialize
+ it. Also check for ITANIUM_CLASS_FLDP.
+ * config/ia64/ia64.h (FP_REGNO_P): New.
+ (HARD_REGNO_MODE_OK): Remove explusion of TImode.
+ (reg_class): Add FP_REGS.
+ (REG_CLASS_NAMES): Adjust for it.
+ (REG_CLASS_CONTENTS): Likewise.
+ (REGNO_REG_CLASS): Use FP_REGS where appropriate.
+ (REG_CLASS_FROM_LETTER): Handle 'x'.
+ (CLASS_MAX_NREGS): Handle FP_REGS.
+ (MEMORY_MOVE_COST): Likewise.
+ * config/ia64/ia64.md (itanium_class): Add fldp.
+ (type): Handle fldp.
+ (movti_internal): More allowable operand combinations. Use ldfp8 when
+ splitting unnecessary. Remove predicable attribute. Adjust
+ itanium_class attribute.
+ (smuldi3_highpart): Remove outdated comment.
+ (mulditi3, umulditi3, rotlti3): New expanders.
+ (addti3, subti3, mulditi3_internal, umulditi3_internal, negti2, rotlti3_internal): New insns.
+ (absti2): Disabled new insn for future reference.
+ Respective new splitters.
+ * config/ia64/itanium1.md (1_fldp, 1b_fldp): New insn reservations.
+ * config/ia64/itanium2.md (2_fldp, 2b_fldp): Likewise.
+ * config/ia64/ia64-protos.h (ia64_load_pair_ok): New.
+
+2005-07-25 James A. Morrison <phython@gcc.gnu.org>
+
+ PR rtl-optimization/23047
+ * simplify-rtx.c (simplify_const_relational_operation): Respect
+ flag_wrapv for comparisons with ABS.
+
+2005-07-27 James A. Morrison <phython@gcc.gnu.org>
+
+ PR tree-optimization/22493
+ * tree-vrp.c (extract_range_from_unary_expr): Deal with -fwrapv and
+ VR_ANTI_RANGEs properly for NEGATE_EXPRs and ABS_EXPRs.
+
+2005-07-27 Aldy Hernandez <aldyh@redhat.com>
+
+ * config/frv/frv.opt (moptimize-membar): New.
+
+ * doc/invoke.texi: Document -moptimize-membar and its inverse.
+
+ * config/frv/frv.h: Remove machine_function definition.
+
+ * config/frv/frv.c (struct frv_io): New.
+ (struct machine_function): Moved from frv.h. Add has_membar_p.
+ (frv_same_doubleword_p, frv_io_fixed_order_p, frv_io_union)
+ (frv_extract_membar, frv_io_check_address, frv_io_handle_set)
+ (frv_io_handle_use_1, frv_io_handle_use, frv_optimize_membar_local)
+ (frv_optimize_membar_global, frv_optimize_membar): New functions.
+ (frv_reorg): Call frv_optimize_membar when appropriate.
+ (bdesc_loads, bdesc_stores): Use the membar code as the icode field.
+ (frv_expand_builtin): Adjust calls accordingly.
+ (frv_io_address_cookie): New function.
+ (frv_expand_load_builtin, frv_expand_store_builtin): Emit a normal
+ load or store rather than a special insn. Add ccnstant address and
+ io-type operands to the membar.
+ (frv_ifcvt_modify_tests): Unsign regno.
+ (frv_ifcvt_modify_tests): Same.
+
+ * config/frv/frv.md: Remove UNSPEC_BUILTIN_{LOAD,STORE}. Change
+ UNSPEC_OPTIONAL_MEMBAR constant.
+ (builtin_read_<mode>): Delete.
+ (builtin_write_<mode>): Delete.
+ ("optional_membar_<mode>"): Add operand.
+
+ * testsuite/gcc.target/frv/all-builtin-read8.c: Delete.
+ * testsuite/gcc.target/frv/all-builtin-read16.c: Delete.
+ * testsuite/gcc.target/frv/all-builtin-read32.c: Delete.
+ * testsuite/gcc.target/frv/all-builtin-read64.c: Delete.
+ * testsuite/gcc.target/frv/all-builtin-write8.c: Delete.
+ * testsuite/gcc.target/frv/all-builtin-write16.c: Delete.
+ * testsuite/gcc.target/frv/all-builtin-write32.c: Delete.
+ * testsuite/gcc.target/frv/all-builtin-write64.c: Delete.
+ * testsuite/gcc.target/frv/all-read-write-1.c: New.
+
+2005-07-28 Kaz Kojima <kkojima@gcc.gnu.org>
+
+ * df.c (df_uses_record): Handle SCRATCH.
+
+2005-07-28 Steven Bosscher <stevenb@suse.de>
+
+ PR debug/20161
+ * passes.c (rest_of_decl_compilation): If decl is a type and
+ we have encountered errors, don't emit debug information.
+
+2005-07-27 Kenneth Zadeck <zadeck@naturalbridge.com>
+
+ * params.def: Fixed comment.
+
+2005-07-27 Bjoern Haase <bjoern.m.haase@web.de>
+
+ PR target/19885
+ * config/avr/avr.c (TARGET_ASM_ALIGNED_SI_OP): Add.
+ (TARGET_ASM_UNALIGNED_HI_OP): Add.
+ (TARGET_ASM_UNALIGNED_SI_OP): Add.
+
2005-07-27 Steven Bosscher <stevenb@suse.de>
PR c++/22003
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.