public inbox for gcc-patches@gcc.gnu.org
 help / color / mirror / Atom feed
From: Richard Guenther <rguenther@suse.de>
To: gcc-patches@gcc.gnu.org
Subject: [PATCH] Decrease integer-share-limit
Date: Thu, 16 Aug 2012 13:41:00 -0000	[thread overview]
Message-ID: <alpine.LNX.2.00.1208161533090.28649@zhemvz.fhfr.qr> (raw)


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",

             reply	other threads:[~2012-08-16 13:41 UTC|newest]

Thread overview: 5+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2012-08-16 13:41 Richard Guenther [this message]
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

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=alpine.LNX.2.00.1208161533090.28649@zhemvz.fhfr.qr \
    --to=rguenther@suse.de \
    --cc=gcc-patches@gcc.gnu.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
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).