A recent patch increased GCC's memory consumption in some cases!

gcctest@suse.de gcctest@suse.de
Sat Jan 13 07:17:00 GMT 2007


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: 18341k
    Peak memory use before GGC: 2263k -> 2264k
    Peak memory use after GGC: 1954k -> 1955k
    Maximum of released memory in single GGC run: 309k
    Garbage: 444k -> 444k
    Leak: 2287k -> 2288k
    Overhead: 455k -> 455k
    GGC runs: 3

comparing empty function compilation at -O0 -g level:
    Overall memory needed: 18357k
    Peak memory use before GGC: 2291k
    Peak memory use after GGC: 1981k -> 1982k
    Maximum of released memory in single GGC run: 310k -> 309k
    Garbage: 447k -> 447k
    Leak: 2320k -> 2320k
    Overhead: 460k -> 460k
    GGC runs: 3

comparing empty function compilation at -O1 level:
    Overall memory needed: 18449k -> 18453k
    Peak memory use before GGC: 2263k -> 2264k
    Peak memory use after GGC: 1954k -> 1955k
    Maximum of released memory in single GGC run: 309k
    Garbage: 450k -> 450k
    Leak: 2290k -> 2291k
    Overhead: 456k -> 456k
    GGC runs: 4

comparing empty function compilation at -O2 level:
    Overall memory needed: 18461k -> 18465k
    Peak memory use before GGC: 2264k -> 2265k
    Peak memory use after GGC: 1954k -> 1955k
    Maximum of released memory in single GGC run: 310k
    Garbage: 453k -> 453k
    Leak: 2290k -> 2291k
    Overhead: 456k -> 456k
    GGC runs: 4

comparing empty function compilation at -O3 level:
    Overall memory needed: 18461k -> 18465k
    Peak memory use before GGC: 2264k -> 2265k
    Peak memory use after GGC: 1954k -> 1955k
    Maximum of released memory in single GGC run: 310k
    Garbage: 453k -> 453k
    Leak: 2290k -> 2291k
    Overhead: 456k -> 456k
    GGC runs: 4

comparing combine.c compilation at -O0 level:
    Overall memory needed: 28617k -> 28625k
    Peak memory use before GGC: 9311k -> 9312k
    Peak memory use after GGC: 8864k
    Maximum of released memory in single GGC run: 2605k -> 2606k
    Garbage: 37287k -> 37297k
    Leak: 6538k -> 6538k
    Overhead: 4829k -> 4829k
    GGC runs: 277 -> 276

comparing combine.c compilation at -O0 -g level:
    Overall memory needed: 30669k -> 30673k
    Peak memory use before GGC: 10894k -> 10895k
    Peak memory use after GGC: 10523k -> 10524k
    Maximum of released memory in single GGC run: 2365k
    Garbage: 37869k -> 37870k
    Leak: 9414k -> 9414k
    Overhead: 5530k -> 5530k
    GGC runs: 271

comparing combine.c compilation at -O1 level:
  Amount of produced GGC garbage increased from 55204k to 55289k, overall 0.15%
    Overall memory needed: 33370k
    Peak memory use before GGC: 20030k -> 20031k
    Peak memory use after GGC: 19831k
    Maximum of released memory in single GGC run: 2264k
    Garbage: 55204k -> 55289k
    Leak: 6574k -> 6566k
    Overhead: 9948k -> 9960k
    GGC runs: 353

comparing combine.c compilation at -O2 level:
    Overall memory needed: 33374k
    Peak memory use before GGC: 20040k
    Peak memory use after GGC: 19840k -> 19841k
    Maximum of released memory in single GGC run: 2205k -> 2206k
    Garbage: 71233k -> 71096k
    Leak: 6693k -> 6686k
    Overhead: 11868k -> 11867k
    GGC runs: 409

comparing combine.c compilation at -O3 level:
  Peak amount of GGC memory allocated before garbage collecting increased from 20847k to 21080k, overall 1.12%
  Peak amount of GGC memory still allocated after garbage collectin increased from 20386k to 20478k, overall 0.45%
    Overall memory needed: 32578k
    Peak memory use before GGC: 20847k -> 21080k
    Peak memory use after GGC: 20386k -> 20478k
    Maximum of released memory in single GGC run: 3125k -> 3126k
    Garbage: 103457k -> 103423k
    Leak: 6763k -> 6768k
    Overhead: 16339k -> 16336k
    GGC runs: 470

comparing insn-attrtab.c compilation at -O0 level:
    Overall memory needed: 89062k -> 89190k
    Peak memory use before GGC: 70731k
    Peak memory use after GGC: 44749k -> 44750k
    Maximum of released memory in single GGC run: 37356k -> 37355k
    Garbage: 131555k -> 131553k
    Leak: 9579k -> 9580k
    Overhead: 16626k -> 16626k
    GGC runs: 210

comparing insn-attrtab.c compilation at -O0 -g level:
    Overall memory needed: 90366k
    Peak memory use before GGC: 71892k -> 71893k
    Peak memory use after GGC: 46017k
    Maximum of released memory in single GGC run: 37356k -> 37357k
    Garbage: 132720k -> 132717k
    Leak: 11268k -> 11269k
    Overhead: 17020k -> 17020k
    GGC runs: 209

comparing insn-attrtab.c compilation at -O1 level:
    Overall memory needed: 98198k -> 98202k
    Peak memory use before GGC: 72733k -> 72734k
    Peak memory use after GGC: 68887k -> 68888k
    Maximum of released memory in single GGC run: 31302k
    Garbage: 228280k -> 228282k
    Leak: 9397k -> 9397k
    Overhead: 29388k -> 29388k
    GGC runs: 222

comparing insn-attrtab.c compilation at -O2 level:
  Ovarall memory allocated via mmap and sbrk decreased from 110334k to 105526k, overall -4.56%
    Overall memory needed: 110334k -> 105526k
    Peak memory use before GGC: 79562k
    Peak memory use after GGC: 73752k -> 73753k
    Maximum of released memory in single GGC run: 29594k -> 29593k
    Garbage: 279538k -> 279541k
    Leak: 9394k -> 9395k
    Overhead: 35690k -> 35690k
    GGC runs: 245

comparing insn-attrtab.c compilation at -O3 level:
    Overall memory needed: 110366k -> 110378k
    Peak memory use before GGC: 79602k
    Peak memory use after GGC: 73792k -> 73793k
    Maximum of released memory in single GGC run: 29764k -> 29760k
    Garbage: 280271k -> 280265k
    Leak: 9398k -> 9399k
    Overhead: 35904k -> 35905k
    GGC runs: 245

comparing Gerald's testcase PR8361 compilation at -O0 level:
    Overall memory needed: 119830k -> 119834k
    Peak memory use before GGC: 93043k
    Peak memory use after GGC: 92119k -> 92120k
    Maximum of released memory in single GGC run: 18913k -> 18912k
    Garbage: 208221k
    Leak: 49014k -> 49015k
    Overhead: 21199k -> 21199k
    GGC runs: 407

comparing Gerald's testcase PR8361 compilation at -O0 -g level:
    Overall memory needed: 132298k -> 132302k
    Peak memory use before GGC: 105317k
    Peak memory use after GGC: 104273k
    Maximum of released memory in single GGC run: 18749k
    Garbage: 214812k -> 214812k
    Leak: 72442k -> 72442k
    Overhead: 27105k -> 27104k
    GGC runs: 382

comparing Gerald's testcase PR8361 compilation at -O1 level:
    Overall memory needed: 132834k -> 132838k
    Peak memory use before GGC: 102898k -> 102899k
    Peak memory use after GGC: 101878k -> 101880k
    Maximum of released memory in single GGC run: 17926k
    Garbage: 397831k -> 397860k
    Leak: 50037k -> 50038k
    Overhead: 53233k -> 53236k
    GGC runs: 574

comparing Gerald's testcase PR8361 compilation at -O2 level:
    Overall memory needed: 132866k -> 132874k
    Peak memory use before GGC: 103002k -> 103003k
    Peak memory use after GGC: 101946k -> 101947k
    Maximum of released memory in single GGC run: 17926k
    Garbage: 454649k -> 454649k
    Leak: 50814k -> 50816k
    Overhead: 46350k -> 46330k
    GGC runs: 630

comparing Gerald's testcase PR8361 compilation at -O3 level:
    Overall memory needed: 134762k -> 134754k
    Peak memory use before GGC: 104577k
    Peak memory use after GGC: 103536k
    Maximum of released memory in single GGC run: 18326k
    Garbage: 470575k -> 470546k
    Leak: 51029k -> 51030k
    Overhead: 45817k -> 45782k
    GGC runs: 641 -> 643

comparing PR rtl-optimization/28071 testcase compilation at -O0 level:
    Overall memory needed: 137646k
    Peak memory use before GGC: 81607k
    Peak memory use after GGC: 58486k -> 58487k
    Maximum of released memory in single GGC run: 44560k -> 44559k
    Garbage: 148154k -> 148154k
    Leak: 8080k -> 8080k
    Overhead: 25066k -> 25066k
    GGC runs: 81

comparing PR rtl-optimization/28071 testcase compilation at -O0 -g level:
    Overall memory needed: 138198k
    Peak memory use before GGC: 82252k -> 82253k
    Peak memory use after GGC: 59132k -> 59133k
    Maximum of released memory in single GGC run: 44208k
    Garbage: 148372k -> 148325k
    Leak: 9335k -> 9335k
    Overhead: 25561k -> 25561k
    GGC runs: 89

comparing PR rtl-optimization/28071 testcase compilation at -O1 level:
    Overall memory needed: 417934k
    Peak memory use before GGC: 200592k -> 200591k
    Peak memory use after GGC: 193290k -> 193289k
    Maximum of released memory in single GGC run: 112412k -> 112413k
    Garbage: 281676k -> 281276k
    Leak: 29804k -> 29804k
    Overhead: 32067k -> 32031k
    GGC runs: 92

comparing PR rtl-optimization/28071 testcase compilation at -O2 level:
    Overall memory needed: 340130k -> 341514k
    Peak memory use before GGC: 200587k -> 200583k
    Peak memory use after GGC: 193285k -> 193281k
    Maximum of released memory in single GGC run: 111836k -> 111840k
    Garbage: 358730k -> 358332k
    Leak: 30387k -> 30387k
    Overhead: 47222k -> 47186k
    GGC runs: 99

comparing PR rtl-optimization/28071 testcase compilation at -O3 -fno-tree-pre -fno-tree-fre level:
    Overall memory needed: 712530k -> 712494k
    Peak memory use before GGC: 299947k -> 299944k
    Peak memory use after GGC: 278933k -> 278930k
    Maximum of released memory in single GGC run: 158589k -> 158597k
    Garbage: 452840k -> 452446k
    Leak: 45439k -> 45440k
    Overhead: 56125k -> 56089k
    GGC runs: 97

Head of the ChangeLog is:

--- /usr/src/SpecTests/sandbox-britten-memory/x86_64/mem-result/ChangeLog	2007-01-12 08:03:04.000000000 +0000
+++ /usr/src/SpecTests/sandbox-britten-memory/gcc/gcc/ChangeLog	2007-01-13 05:30:55.000000000 +0000
@@ -1,3 +1,309 @@
+2007-01-12  Andrew Pinski  <andrew_pinski@playstation.sony.com>
+
+	* configure.ac: Set insn to "nop" for spu-*-* also.
+	* configure: Regenerate.
+
+2007-01-12  Olga Golovanevsky  <olga@il.ibm.com>
+
+	* builtins.def : Add BUILT_IN_FREE.
+	
+2007-01-12  Jan Hubicka  <jh@suse.cz>
+
+	PR tree-optimization/30443
+	* tree-inline.c (tree_function_versioning): Do not optimize when
+	cloning for inlining.
+
+2007-01-12  Zdenek Dvorak <dvorakz@suse.cz>
+
+	* doc/loop.texi: Document recording of loop exits.
+	* cfgloopmanip.c (loopify, duplicate_loop): Use alloc_loop.
+	(update_single_exits_after_duplication,
+	update_single_exit_for_duplicated_loop,
+	update_single_exit_for_duplicated_loops): Removed.
+	(duplicate_loop_to_header_edge): Do not call
+	update_single_exits_after_duplication and
+	update_single_exit_for_duplicated_loops.
+	(loop_version): Do not update single_exit information.
+	(fix_loop_structure): Use record_loop_exits instead of
+	mark_single_exit_loops.
+	* tree-ssa-loop-manip.c (tree_transform_and_unroll_loop): Update
+	the lists of loop exits.
+	* cfghooks.c (redirect_edge_and_branch, redirect_edge_and_branch_force,
+	split_edge, merge_blocks): Update the lists of loop exits.
+	* modulo-sched.c (sms_schedule): Pass LOOPS_HAVE_RECORDED_EXITS to
+	loop_optimizer_init.
+	* loop-init.c (loop_optimizer_init): Call record_loop_exits instead
+	of mark_single_exit_loops.
+	(loop_optimizer_finalize): Call release_recorded_exits.
+	* tree-ssa-loop.c (tree_loop_optimizer_init): Pass
+	LOOPS_HAVE_RECORDED_EXITS to loop_optimizer_init.
+	* tree-vectorizer.c (slpeel_tree_duplicate_loop_to_edge_cfg): Do not
+	update single exit information.
+	* lambda-code.c (perfect_nestify): Ditto.
+	* cfgloop.c (flow_loop_free): Destroy the list of exits of the loop.
+	(mark_single_exit_loops): Removed.
+	(alloc_loop, loop_exit_hash, loop_exit_eq, loop_exit_free,
+	get_exit_descriptions, rescan_loop_exit, record_loop_exits,
+	dump_recorded_exit, dump_recorded_exits, release_recorded_exits): New
+	functions.
+	(get_loop_exit_edges, single_exit): Use recorded exit lists.
+	(add_bb_to_loop, remove_bb_from_loops): Update the lists of loop exits.
+	(verify_loop_structure): Verify consistency of the exit lists.
+	(flow_loops_find): Use alloc_loop.  Initialize exits hash.
+	(set_single_exit): Removed.
+	* cfgloop.h (struct loop_exit): New function.
+	(struct loop): single_exit_ field replaced by exits field.
+	(LOOPS_HAVE_MARKED_SINGLE_EXITS): Replaced by LOOPS_HAVE_RECORDED_EXITS.
+	(struct loops): Added exits hash.
+	(mark_single_exit_loops, set_single_exit): Declaration removed.
+	(release_recorded_exits, record_loop_exits, rescan_loop_exit): Declare.
+
+2007-01-12  Richard Sandiford  <richard@codesourcery.com>
+
+	* doc/invoke.texi: Avoid use of @headitem.
+
+2007-01-12  Richard Sandiford  <richard@codesourcery.com>
+
+	* cse.c (cse_insn): Move HAVE_CC0 code after declarations.
+
+2007-01-12  Richard Sandiford  <richard@codesourcery.com>
+
+	* doc/install.texi: Fix m68k-*-* anchor and add m68k-*-* to the
+	list of targets.
+
+2007-01-12  Nathan Sidwell  <nathan@codesourcery.com>
+	    Richard Sandiford  <richard@codesourcery.com>
+
+	* doc/invoke.texi: Document -mno-bitfield, -mno-rtd and -mno-short.
+	* config/m68k/m68k.opt: Resort options.
+	(mbitfield, mrtd, mshort): Remove RejectNegative properties.
+
+2007-01-12  Nathan Sidwell  <nathan@codesourcery.com>
+	    Richard Sandiford  <richard@codesourcery.com>
+
+	* doc/invoke.texi: Document the macros that are defined by
+	m68k's -mtune and -mhard-float options.
+	* config/m68k/m68k-protos.h (m68k_cpp_cpu_ident) Declare.
+	(m68k_cpp_cpu_family): Likewise.
+	* config/m68k/m68k.h (TARGET_CPU_CPP_BUILTINS): Add a full set
+	of __ucfv*__ macros.  Define __mcffpu__ if generating code for
+	ColdFire FPUs.  Define __mcf_cpu_* and __mcf_family_* macros.
+	* config/m68k/m68k.c (m68k_cpp_cpu_ident): New function.
+	(m68k_cpp_cpu_family): Likewise.
+
+2007-01-12  Richard Sandiford  <richard@codesourcery.com>
+
+	* config/m68k/m68k.h (TARGET_CPU_CPP_BUILTINS): Treat all mc68*
+	macros besides mc68000 as tuning macros.  Use a switch statement
+	to set them and mcpu32.
+
+2007-01-12  Julian Brown  <julian@codesourcery.com>
+
+	* config/m68k/m68k.h: Use TARGET_68040 instead of TARGET_68040_ONLY.
+	(TARGET_68040_ONLY): Rename to...
+	(TARGET_68040): ...this.
+	* config/m68k/m68k.c: Use TARGET_68040 instead of TARGET_68040_ONLY.
+	* config/m68k/m68k.md: Likewise.
+
+2007-01-12  Julian Brown  <julian@codesourcery.com>
+	    Nathan Sidwell  <nathan@codesourcery.com>
+	    Richard Sandiford  <richard@codesourcery.com>
+
+	* config.gcc (m680[012]0-*-*, m68k*-*-*): Set m68k_cpu_ident to
+	the -mcpu= argument associated with the --with-cpu setting.
+	Define M68K_DEFAULT_TUNE to the default -mtune= option,
+	if different from the one implied by the -mcpu setting.
+	Accept --with-cpu=FOO if FOO is listed in m68k-devices.def,
+	using mcpu=FOO as the default CPU option.  Set target_cpu_default2.
+	* doc/invoke.texi: Mention ColdFire in the introduction to the
+	m68k options.  Document the new -march, -mcpu, -mtune, -mdiv,
+	-mno-div and -mhard-float options.  Make -m68881 a synonym for
+	-mhard-float.  Document the previously-undocumented -m5206e,
+	-m528x, -m5307 and -m5407 options.  Tweak the existing option
+	documentation for consistency.
+	* doc/install.texi: Mention new --with-cpu arguments.
+	* config/m68k/m68k.h (OPTION_DEFAULT_SPECS): Only use the
+	default CPU if neither -mcpu nor -march are specified.
+	(ASM_CPU_SPEC): Pass down -mcpu and -march options.
+	(TARGET_CPU_CPP_BUILTINS): Set __mcfisa*__ macros from
+	TARGET_ISA*.  Set the legacy __mcf*__ cpu macros in the same way,
+	using m68k_tune to decide between families that implement the
+	same ISA.  Use m68k_tune to set __mcfv4e__.
+	(FL_BITFIELD, FL_68881, FL_COLDFIRE, FL_CF_HWDIV, FL_CF_MAC)
+	(FL_CF_EMAC, FL_CF_EMAC_B, FL_CF_USP, FL_CF_FPU, FL_ISA_68000)
+	(FL_ISA_68010, FL_ISA_68020, FL_ISA_68040, FL_ISA_A, FL_ISA_B)
+	(FL_ISA_C, FL_ISA_MMU): New macros.
+	(MASK_COLDFIRE): Delete.
+	(TARGET_68010, TARGET_68020, TARGET_68040_ONLY, TARGET_COLDFIRE)
+	(TARGET_ISAB): Redefine in terms of m68k_cpu_flags.
+	(TARGET_68881, TARGET_COLDFIRE_FPU): Redefine in terms of m68k_fpu.
+	(TARGET_HARD_FLOAT): Do not define here.
+	(TARGET_ISAAPLUS, TARGET_ISAC): New macros.
+	(TUNE_68000): New macro.
+	(TUNE_68000_10): Redefine in terms of TUNE_68000 and TUNE_68010.
+	(TUNE_68010, TUNE_68030, TUNE_68040, TUNE_68060, TUNE_CPU32)
+	(TUNE_CFV2): Redefine in terms of m68k_tune.
+	(uarch_type, target_device, fpu_type): New enums.
+	(m68k_cpu, m68k_tune, m68k_fpu, m68k_cpu_flags): Declare.
+	* config/m68k/m68k.c (TARGET_DEFAULT): Remove MASK_68881.
+	(FL_FOR_isa_00, FL_FOR_isa_10, FL_FOR_isa_20, FL_FOR_isa_40)
+	(FL_FOR_isa_cpu32, FL_FOR_isa_a, FL_FOR_isa_aplus, FL_FOR_isa_b)
+	(FL_FOR_isa_c): New macros.
+	(m68k_isa): New enum.
+	(m68k_target_selection): New structure.
+	(all_devices, all_isas, all_microarchs): New tables.
+	(m68k_cpu_entry, m68k_arch_entry, m68k_tune_entry, m68k_cpu)
+	(m68k_tune, m68k_fpu, m68k_cpu_flags): New variables.
+	(MASK_ALL_CPU_BITS): Delete.
+	(m68k_find_selection): New function.
+	(m68k_handle_option): Handle -mcpu=, -march= and -mtune=.
+	Map the legacy target options to a combination of the new ones.
+	(override_options): Set m68k_cpu, m68k_tune, m68k_fpu and
+	m68k_cpu_flags.  Handle M68K_DEFAULT_TUNE.  Use m68k_cpu_flags
+	to derive default MASK_BITFIELD, MASK_CF_HWDIV and MASK_HARD_FLOAT
+	settings.
+	* config/m68k/m68k.opt (m5200, m5206e, m528x, m5307, m5407, mcfv4e)
+	(m68010, m68020, m68020-40, m68020-60, m68030, m68040): Remove Mask
+	properties.
+	(m68881, msoft-float): Change mask from 68881 to HARD_FLOAT.
+	(march=, mcpu=, mdiv, mhard-float, mtune=): New options.
+	* config/m68k/m68k-devices.def: New file.
+
+2007-01-12  Richard Sandiford  <richard@codesourcery.com>
+	    Nathan Sidwell  <nathan@codesourcery.com>
+
+	* config/m68k/m68k.h (ASM_CPU_SPEC, ASM_SPEC, EXTRA_SPECS)
+	(SUBTARGET_EXTRA_SPECS): New macros.
+	* config/m68k/linux.h (ASM_SPEC): Remove CPU flags;
+	use %(asm_cpu_spec) instead.
+	* config/m68k/m68k-none.h (ASM_SPEC): Likewise.
+	* config/m68k/openbsd.h (ASM_SPEC): Likewise.
+	* config/m68k/netbsd-elf.h (ASM_SPEC): Likewise.
+	(EXTRA_SPECS): Rename to...
+	(SUBTARGET_EXTRA_SPECS): ...this.
+
+2007-01-12  Nathan Sidwell  <nathan@codesourcery.com>
+	    Richard Sandiford  <richard@codesourcery.com>
+	    Julian Brown  <julian@codesourcery.com>
+
+	* config.gcc (m68k-*-aout*, m68k-*-coff*, m68020-*-elf*, m68k-*-elf*)
+	(m68k-*-uclinux*, m68k-*-linux*, m68k-*-rtems*): Set default_m68k_cpu
+	to the configuration's default CPU.
+	(m68010-*-netbsdelf*, m68k*-*-netbsdelf*, m68k*-*-openbsd*): Likewise.
+	Remove default masks.
+	(m680[012]0-*-*): Set the default with_cpu to the first part of
+	the target name.
+	(m68k*-*-*): Set the default with_cpu to m$default_m68k_cpu.
+	(m68k*-*-linux): Extend the --with-cpu handling to...
+	(m680[012]0-*-*, m68k*-*-*): ...these configurations.  Allow m68000
+	and m68010.  Don't set target_cpu_default2.
+	* doc/install.texi: Document --with-cpu for m68k.
+	* config/m68k/m68k.h (OPTION_DEFAULT_SPECS): Define.
+	* config/m68k/m68k-none.h (TARGET_CPU_DEFAULT, M68K_CPU_m68k)
+	(M68K_CPU_m68000, M68K_CPU_m68010, M68K_CPU_m68020, M68K_CPU_m68030)
+	(M68K_CPU_m68040, M68K_CPU_m68302, M68K_CPU_m68332, TARGET_DEFAULT)
+	(ASM_CPU_DEFAULT_SPEC, CC1_CPU_DEFAULT_SPEC): Delete.
+	(ASM_SPEC): Remove use of %(asm_cpu_default).
+	(EXTRA_SPECS, SUBTARGET_EXTRA_SPECS, MULTILIB_DEFAULTS): Delete.
+	* config/m68k/linux.h (TARGET_DEFAULT): Delete.
+	(CPP_SPEC): Merge definitions.  Do not handle __HAVE_68881__ here.
+	* config/m68k/netbsd-elf.h (TARGET_OS_CPP_BUILTINS): Define
+	__HAVE_FPU__ if TARGET_HARD_FLOAT.
+	(TARGET_DEFAULT): Delete.
+	(EXTRA_SPECS): Delete cpp_cpu_default_spec, cpp_cpu_spec,
+	cpp_fpu_spec, asm_default_spec and netbsd_cpp_spec.
+	(CPP_CPU_SPEC): Delete.
+	(TARGET_VERSION): Merge definitions, using TARGET_68010 to pick
+	the appropriate string.
+	(CPP_CPU_DEFAULT_SPEC, ASM_DEFAULT_SPEC, CPP_FPU_SPEC): Delete.
+	(CPP_SPEC): Define to NETBSD_CPP_SPEC.
+	(ASM_SPEC): Don't use %(asm_default_spec).
+	* config/m68k/m68k.c (TARGET_DEFAULT_TARGET_FLAGS): Remove
+	TARGET_DEFAULT and add MASK_68881.
+	* config/m68k/m68k.md: Remove mention of TARGET_DEFAULT from comments.
+
+2007-01-12  Richard Sandiford  <richard@codesourcery.com>
+
+	* config.gcc (m68010-*-netbsdelf*): Add MASK_68010.
+	(m68k*-*-netbsdelf*, m68k*-*-openbsd*, m68k*-linux*): Add
+	MASK_68010 alongside MASK_68020.
+	* doc/invoke.texi: Document -m68010.
+	* config/m68k/m68k.opt (m68010): New.
+	* config/m68k/m68k.h (TARGET_CPU_CPP_BUILTINS): Define mc68010
+	if TUNE_68010.
+	(TUNE_68010): New macro.
+	* config/m68k/m68k-none.h (M68K_CPU_m68k, M68K_CPU_m68010)
+	(M68K_CPU_m68020, M68K_CPU_m68030, M68K_CPU_m68040)
+	(M68K_CPU_m68332): Add MASK_68010.
+	* config/m68k/linux.h (TARGET_DEFAULT): Add MASK_68010 to
+	fallback definition.
+	* config/m68k/netbsd-elf.h (CPP_CPU_SPEC): Remove now-redundant
+	defines.
+	* config/m68k/m68k.c (MASK_ALL_CPU_BITS): Add MASK_68010.
+	(m68k_handle_option): Handle OPT_m68010.  Add MASK_68010
+	to all entries that use MASK_68020.
+	(output_move_simode_const, output_move_himode, output_move_qimode)
+	(output_move_stricthi, output_move_strictqi): Use TARGET_68010
+	instead of TARGET_68020 to select clr behavior.  Remove comment
+	about there being no TARGET_68010.
+	* config/m68k/m68k.md: Likewise throughout.
+
+2007-01-12  Julian Brown  <julian@codesourcery.com>
+
+	* config/m68k/m68k.h (TARGET_ISAB): New macro.
+	* config/m68k/m68k.c: Use TARGET_ISAB rather than TARGET_CFV4.
+	* config/m68k/m68k.md: Likewise.
+
+2007-01-12  Julian Brown  <julian@codesourcery.com>
+
+	* config/m68k/m68k.h (LEGITIMATE_INDEX_P, LEGITIMIZE_ADDRESS): Use
+	TARGET_COLDFIRE_FPU instead of TARGET_CFV4E.
+
+2007-01-12  Julian Brown  <julian@codesourcery.com>
+
+	* config/m68k/m68k.h (TUNE_68040_60): New macro.
+	* config/m68k/m68k.c (standard_68881_constant_p): Use it.
+	* config/m68k/m68k.md: Likewise.
+
+2007-01-12  Julian Brown  <julian@codesourcery.com>
+	    Richard Sandiford  <richard@codesourcery.com>
+
+	* config/m68k/m68k.h (TARGET_CPU_CPP_BUILTINS): Use TUNE_68030
+	instead of TARGET_68030, TUNE_68040 instead of TARGET_68040,
+	TUNE_68060 instead of TARGET_68060 and TUNE_CPU32 instead of
+	TARGET_CPU32.
+	(TARGET_CPU32): Rename to...
+	(TUNE_CPU32): ...this.
+	(TUNE_68000_10, TUNE_68030, TUNE_68040, TUNE_68060)
+	(TUNE_CFV2): New macros.
+	* config/m68k/netbsd-elf.h (LONG_DOUBLE_TYPE_SIZE): Simplify;
+	remove conditions that are implied by TARGET_68020.
+	* config/m68k/m68k.c (m68k_output_function_prologue): Use TUNE_68040
+	instead of TARGET_68040 and TUNE_CPU32 instead of TARGET_CPU32.
+	(m68k_output_function_epilogue): Likewise.
+	(m68k_rtx_costs): Likewise.  Use TUNE_68060 instead of TARGET_68060
+	and TUNE_CFV2 instead of TARGET_5200.  Use TUNE_68000_10 instead of
+	"!TARGET_68020 && !TARGET_COLDFIRE" to choose between 68000 and
+	non-68000 timings.  Refactor multiplication and division costs.
+	(output_addsi3): Use TUNE_68040 instead of TARGET_68040 and
+	TUNE_CPU32 instead of TARGET_CPU32.
+	(standard_68881_constant_p): Use TUNE_68040 instead of TARGET_68040
+	and TUNE_68060 instead of TARGET_68060.
+	* config/m68k/m68k.md: Use TUNE_68040 instead of TARGET_68040,
+	TUNE_68060 instead of TARGET_68060, and TUNE_CPU32 instead of
+	TARGET_CPU32.
+	(movsi_const0): Use TUNE_68000_10 rather than "!TARGET_68020
+	&& !TARGET_COLDFIRE" to choose between moveq and clr.
+	Likewise in the unnamed movsf pattern.
+	(ashlsi_17_24, lshrsi_17_24): Guard with TUNE_68000_10 rather than
+	"!TARGET_68020 && !TARGET_COLDFIRE".  Likewise the unnamed
+	ashiftrt pattern.
+
+2007-01-12  Richard Sandiford  <richard@codesourcery.com>
+
+	* config/m68k/m68k.h (TARGET_CPU_CPP_BUILTINS): Increase amount
+	of tabbing before backslashes.
+
 2007-01-11  John David Anglin  <dave.anglin@nrc-cnrc.gc.ca>
 
 	* pa-linux.h (ASM_OUTPUT_INTERNAL_LABEL): Undefine.


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