From: Richard Sandiford <richard.sandiford@linaro.org>
To: Jan Hubicka <hubicka@ucw.cz>
Cc: "H.J. Lu" <hjl.tools@gmail.com>,
gcc-patches@gcc.gnu.org, rguenther@suse.de, mjambor@suse.cz
Subject: Re: [RFC] Context sensitive inline analysis
Date: Wed, 28 Sep 2011 11:56:00 -0000 [thread overview]
Message-ID: <g4mxdp543h.fsf@richards-thinkpad.stglab.manchester.uk.ibm.com> (raw)
In-Reply-To: <20110927144617.GF21364@kam.mff.cuni.cz> (Jan Hubicka's message of "Tue, 27 Sep 2011 16:46:17 +0200")
Jan Hubicka <hubicka@ucw.cz> writes:
> the problem is sign overflow in time computation. Time should be
> capped by MAX_TIME and we compute MAX_TIME * INLINE_SIZE_SCALE *
> 2. This happens to be >2^31 & <2^32 so we overflow here because of use
> of signed arithmetics.
>
> Index: ipa-inline-analysis.c
> ===================================================================
> --- ipa-inline-analysis.c (revision 179266)
> +++ ipa-inline-analysis.c (working copy)
> @@ -92,7 +92,7 @@ along with GCC; see the file COPYING3.
> /* Estimate runtime of function can easilly run into huge numbers with many
> nested loops. Be sure we can compute time * INLINE_SIZE_SCALE in integer.
> For anything larger we use gcov_type. */
> -#define MAX_TIME 1000000
> +#define MAX_TIME 500000
>
> /* Number of bits in integer, but we really want to be stable across different
> hosts. */
Could you update the comment too? ("time * INLINE_SIZE_SCALE * 2")
Richard
next prev parent reply other threads:[~2011-09-28 10:55 UTC|newest]
Thread overview: 19+ messages / expand[flat|nested] mbox.gz Atom feed top
2011-04-22 14:17 Jan Hubicka
2011-04-22 21:02 ` Jan Hubicka
2011-04-23 0:14 ` Jan Hubicka
2011-04-23 10:47 ` Richard Guenther
2011-04-23 17:00 ` Jan Hubicka
2011-05-27 8:31 ` H.J. Lu
2011-05-27 8:52 ` H.J. Lu
2011-09-27 16:20 ` Jan Hubicka
2011-09-28 11:56 ` Richard Sandiford [this message]
2011-10-03 8:12 ` Richard Sandiford
2011-04-25 15:35 David Edelsohn
2011-04-26 13:02 ` Jan Hubicka
2011-04-27 13:18 ` Jan Hubicka
2011-04-27 14:38 ` H.J. Lu
2011-04-27 15:46 ` Jan Hubicka
2011-04-28 13:27 ` David Edelsohn
2011-04-28 13:43 ` Jan Hubicka
[not found] ` <BANLkTikScRy+QwZiPyGhHhmuu+ACF65HJA@mail.gmail.com>
2011-04-30 13:38 ` Jan Hubicka
2011-04-30 16:38 ` David Edelsohn
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=g4mxdp543h.fsf@richards-thinkpad.stglab.manchester.uk.ibm.com \
--to=richard.sandiford@linaro.org \
--cc=gcc-patches@gcc.gnu.org \
--cc=hjl.tools@gmail.com \
--cc=hubicka@ucw.cz \
--cc=mjambor@suse.cz \
--cc=rguenther@suse.de \
/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).