This is the mail archive of the
gcc-patches@gcc.gnu.org
mailing list for the GCC project.
Re: PR 23551: why should we coalesce inlined variables?
- From: Jan Hubicka <hubicka at ucw dot cz>
- To: Alexandre Oliva <aoliva at redhat dot com>
- Cc: Andrew MacLeod <amacleod at redhat dot com>, "Seongbae Park (?????????, ?????????)" <seongbae dot park at gmail dot com>, Andrew Pinski <pinskia at gmail dot com>, gcc-patches at gcc dot gnu dot org
- Date: Sun, 8 Jul 2007 01:10:32 +0200
- Subject: Re: PR 23551: why should we coalesce inlined variables?
- References: <or7irhxh3t.fsf@free.oliva.athome.lsd.ic.unicamp.br> <1178807417.3671.249.camel@localhost.localdomain> <orabw67iep.fsf@free.oliva.athome.lsd.ic.unicamp.br> <1179318946.3671.478.camel@localhost.localdomain> <orr6ovgqsy.fsf@free.oliva.athome.lsd.ic.unicamp.br> <de8d50360706011715g401af925g30170754010ee90b@mail.gmail.com> <orbqf0zom9.fsf@oliva.athome.lsd.ic.unicamp.br> <ab3a61990706280018s33ffa5b6yb2958f706e488094@mail.gmail.com> <1183031507.3902.317.camel@localhost.localdomain> <ord4zca8c5.fsf@oliva.athome.lsd.ic.unicamp.br>
> On Jun 28, 2007, Andrew MacLeod <amacleod@redhat.com> wrote:
>
> > I fooled around with some simple cases, and didn't find anything that
> > made much difference. Whats a testcase you have which shows this
> > helping?
>
> Err... I'm sure I had something when I posted the patch, but the
> build tree in which I came up with the testcase is long gone, and I no
> longer remember the details. On a more recent build tree, I couldn't
> really find any case in which the patch really made a difference as to
> debug info :-(
Hi,
this patch seems to be responsible for 90% memory consumption increase
at rtl-optimization/28071 -O3:
comparing PR rtl-optimization/28071 testcase compilation at -O3 -fno-tree-pre -fno-tree-fre level:
Overall memory allocated via mmap and sbrk increased from 1031749k to 1965705k, overall 90.52%
Peak amount of GGC memory allocated before garbage collecting increased from 184687k to 190538k, overall 3.17%
Peak amount of GGC memory still allocated after garbage collecting increased from 172203k to 178054k, overall 3.40%
Amount of produced GGC garbage increased from 348399k to 389440k, overall 11.78%
Overall memory needed: 1031749k -> 1965705k
Peak memory use before GGC: 184687k -> 190538k
Peak memory use after GGC: 172203k -> 178054k
Maximum of released memory in single GGC run: 80995k -> 81025k
Garbage: 348399k -> 389440k
Leak: 47832k -> 47091k
Overhead: 45175k -> 48668k
GGC runs: 66 -> 65
Head of the ChangeLog is:
--- /usr/src/SpecTests/sandbox-britten-memory/x86_64/mem-result/ChangeLog 2007-07-06 05:24:13.000000000 +0000
+++ /usr/src/SpecTests/sandbox-britten-memory/gcc/gcc/ChangeLog 2007-07-06 21:46:50.000000000 +0000
@@ -1,3 +1,107 @@
+2007-07-06 Ian Lance Taylor <iant@google.com>
+ Zack Weinberg <zackw@panix.com>
+
+ PR middle-end/32441
+ * builtins.c (std_expand_builtin_va_start): Don't use make_tree.
+
+2007-07-06 Richard Sandiford <richard@codesourcery.com>
+
+ * config/sh/sh.md (*prefetch_i4): Disable for TARGET_VXWORKS_RTP.
+ (prefetch): Likewise if "pref" would be used.
+
+2007-07-06 Josh Conner <jconner@apple.com>
+
+ PR middle-end/32602
+ PR middle-end/32603
+ * calls.c (store_one_arg): Handle arguments which are partially
+ on the stack when detecting argument overlap.
+
+2007-07-06 Bernd Schmidt <bernd.schmidt@analog.com>
+
+ * reload1.c (choose_reload_regs): Set reload_spill_index for regs
+ chosen during find_reloads.
+
+2007-07-06 Richard Guenther <rguenther@suse.de>
+
+ * gimplify.c (gimplify_call_expr): Prefer DECL_ARGUMENTS over
+ TYPE_ARG_TYPES for verification of argument types. Use
+ DECL_ARG_TYPE instead of the PARM_DECL type. Take excess
+ parameters as variable arguments.
+
+2007-07-06 Andreas Krebbel <krebbel1@de.ibm.com>
+
+ * libgcc2.h (word_type): Type definition removed.
+ (cmp_return_type, shift_count_type): Type definitions added.
+ (__lshrdi3, __ashldi3, __ashrdi3): word_type of second parameter
+ replaced with shift_count_type.
+ (__cmpdi2, __ucmpdi2): word_type of return type replaced with
+ cmp_return_type.
+ * libgcc2.c (__udivmoddi4, __moddi3): Type of local variable c
+ changed from word_type to Wtype.
+ (__lshrdi3, __ashldi3, __ashrdi3): word_type of second parameter
+ replaced with shift_count_type.
+ (__cmpdi2, __ucmpdi2): word_type of return type replaced with
+ cmp_return_type.
+ * c-common.c (handle_mode_attribute): Handling for libgcc_cmp_return and
+ libgcc_shift_count attribute added.
+ * target-def.h (TARGET_LIBGCC_CMP_RETURN_MODE,
+ TARGET_LIBGCC_SHIFT_COUNT_MODE): New target hooks defined.
+ (TARGET_INITIALIZER): New target hooks added.
+ * targhooks.c (default_libgcc_cmp_return_mode,
+ default_libgcc_shift_count_mode): Default implementations for the new
+ target hooks added.
+ * targhooks.h (default_libgcc_cmp_return_mode,
+ default_libgcc_shift_count_mode): Function prototypes added.
+ * target.h (struct gcc_target): Fields for the new target hooks added.
+ * optabs.c (expand_binop): Use shift_count_mode when expanding shift
+ as library call.
+ (prepare_cmp_insn): Use cmp_return_mode when expanding comparison as
+ library call.
+
+ * doc/tm.texi (TARGET_LIBGCC_CMP_RETURN_MODE,
+ TARGET_LIBGCC_SHIFT_COUNT_MODE): Documentation added.
+
+ * config/s390/s390.c (s390_libgcc_cmp_return_mode,
+ s390_libgcc_shift_count_mode): Functions added.
+ (TARGET_LIBGCC_CMP_RETURN_MODE, TARGET_LIBGCC_SHIFT_COUNT_MODE): Target
+ hooks defined.
+
+2007-07-06 Richard Sandiford <richard@codesourcery.com>
+
+ * config/mips/mips.c (compute_frame_size): Restore the original
+ gp_sp_offset for !GENERATE_MIPS16E_SAVE_RESTORE and remove the
+ fp_size term from the GENERATE_MIPS16E_SAVE_RESTORE calculation.
+ Document why the difference is needed.
+
+2007-07-06 Richard Guenther <rguenther@suse.de>
+
+ * c-common.c (boolean_increment): Use correctly typed
+ constant.
+
+2007-07-06 Richard Sandiford <richard@codesourcery.com>
+
+ * config/mips/mips.c (mips16e_save_restore_pattern_p): Check that
+ the topmost argument register is not also included in the save mask.
+ (mips16e_collect_argument_save_p): Take a pointer to the argument
+ register, rather than a pointer to the number of arguments.
+ (mips16e_collect_argument_saves): Only include argument saves
+ that aren't in the register mask.
+
+2007-07-06 Uros Bizjak <ubizjak@gmail.com>
+
+ PR rtl_optimization/32450
+ * function.c (thread_prologue_and_epilogue_insns): Emit blockage insn
+ to ensure that instructions are not moved into the prologue when
+ profiling is on. Remove unused prologue_end variable.
+ (expand_function_end): Emit blockage insn instead of ASM_INPUT rtx
+ as a scheduling barrier.
+
+2007-07-06 Alexandre Oliva <aoliva@redhat.com>
+
+ PR debug/23551
+ * tree-ssa-copyrename.c (copy_rename_partition_coalesce):
+ Disregard DECL_FROM_INLINE.
+
2007-07-05 Adam Nemet <anemet@caviumnetworks.com>
* rtlanal.c (num_sign_bit_copies1): Improve cases of ANDing or
--- /usr/src/SpecTests/sandbox-britten-memory/x86_64/mem-result/ChangeLog.cp 2007-07-06 05:24:12.000000000 +0000
+++ /usr/src/SpecTests/sandbox-britten-memory/gcc/gcc/cp/ChangeLog 2007-07-06 21:46:49.000000000 +0000
@@ -1,3 +1,8 @@
+2007-07-06 Richard Guenther <rguenther@suse.de>
+
+ * init.c (build_new_1): Use the correct pointer type.
+ * typeck2.c (build_m_component_ref): Likewise.
+
2007-07-05 Mark Mitchell <mark@codesourcery.com>
PR c++/32245
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.