public inbox for gcc-patches@gcc.gnu.org
 help / color / mirror / Atom feed
* [PATCH] Decrease integer-share-limit
@ 2012-08-16 13:41 Richard Guenther
  2012-08-16 14:37 ` Paolo Carlini
  0 siblings, 1 reply; 5+ messages in thread
From: Richard Guenther @ 2012-08-16 13:41 UTC (permalink / raw)
  To: gcc-patches


This decreases the integer-share-limit to make sure the TREE_VEC we
allocate for the small cached integers has a reasonable size for
our GC memory allocator.  With the current value (256) and a reduced 
testcase from PR54146 we see

tree.c:1224 (build_int_cst_wide)                         40: 0.0%          
0: 0.0%   35443680: 8.7%   11635920:39.0%       9305

thus 39% overhead (oops, that TREE_VEC has size 2080).  Reducing
this to 251 yields

tree.c:1224 (build_int_cst_wide)                         40: 0.0%          
0: 0.0%   11698864: 3.0%      33696: 0.2%       9154

which is much nicer (size 2048 for signed ints, 1020 bytes on
32bit hosts if I counted correctly).

I'm queueing this for a bootstrap & regtest run.

Richard.

2012-08-16  Richard Guenther  <rguenther@suse.de>

	* params.def (integer-share-limit): Decrease from 256 to 251,
	add rationale.

Index: gcc/params.def
===================================================================
*** gcc/params.def	(revision 190442)
--- gcc/params.def	(working copy)
*************** DEFPARAM(PARAM_MAX_LAST_VALUE_RTL,
*** 638,648 ****
  
  /* INTEGER_CST nodes are shared for values [{-1,0} .. N) for
     {signed,unsigned} integral types.  This determines N.
!    Experimentation shows 256 to be a good value.  */
  DEFPARAM (PARAM_INTEGER_SHARE_LIMIT,
  	  "integer-share-limit",
  	  "The upper bound for sharing integer constants",
! 	  256, 2, 2)
  
  DEFPARAM (PARAM_SSP_BUFFER_SIZE,
  	  "ssp-buffer-size",
--- 638,649 ----
  
  /* INTEGER_CST nodes are shared for values [{-1,0} .. N) for
     {signed,unsigned} integral types.  This determines N.
!    Experimentation shows 251 to be a good value that generates the
!    least amount of garbage for allocating the TREE_VEC storage.  */
  DEFPARAM (PARAM_INTEGER_SHARE_LIMIT,
  	  "integer-share-limit",
  	  "The upper bound for sharing integer constants",
! 	  251, 2, 2)
  
  DEFPARAM (PARAM_SSP_BUFFER_SIZE,
  	  "ssp-buffer-size",

^ permalink raw reply	[flat|nested] 5+ messages in thread

end of thread, other threads:[~2012-08-17  7:52 UTC | newest]

Thread overview: 5+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2012-08-16 13:41 [PATCH] Decrease integer-share-limit Richard Guenther
2012-08-16 14:37 ` Paolo Carlini
2012-08-16 14:46   ` Richard Guenther
2012-08-16 14:59     ` Jakub Jelinek
2012-08-17  7:52       ` Richard Guenther

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).