public inbox for gcc-patches@gcc.gnu.org
 help / color / mirror / Atom feed
From: Jan Hubicka <hubicka@ucw.cz>
To: gcc-patches@gcc.gnu.org
Subject: Fix early inliner ICE
Date: Thu, 22 Oct 2009 14:06:00 -0000	[thread overview]
Message-ID: <20091022133004.GE24874@kam.mff.cuni.cz> (raw)

Hi,
in previous patch I mistakely comitted testcase for 40556 that is fixed by this patch.
Problem is that loop doing incremental inlining for fixed number of iterations has
wrong exit condition so we decide on inlining but do not apply in last iteration.

Bootstrapped/regtested x86_64-linux.  I will also update PR info of the previous commit
while comitting this.

	PR tree-optimize/40556                                                                                                                                         
	* ipa-inline.c (cgraph_early_inlining): Fix iterations condition.
Index: ipa-inline.c
===================================================================
*** ipa-inline.c	(revision 153449)
--- ipa-inline.c	(working copy)
*************** cgraph_early_inlining (void)
*** 1589,1598 ****
  
    if (sorrycount || errorcount)
      return 0;
!   while (cgraph_decide_inlining_incrementally (node,
!   					       iterations
! 					       ? INLINE_SIZE_NORECURSIVE : INLINE_SIZE, 0)
! 	 && iterations < PARAM_VALUE (PARAM_EARLY_INLINER_MAX_ITERATIONS))
      {
        timevar_push (TV_INTEGRATION);
        todo |= optimize_inline_calls (current_function_decl);
--- 1589,1598 ----
  
    if (sorrycount || errorcount)
      return 0;
!   while (iterations < PARAM_VALUE (PARAM_EARLY_INLINER_MAX_ITERATIONS)
!          && cgraph_decide_inlining_incrementally (node,
!   					          iterations
! 					          ? INLINE_SIZE_NORECURSIVE : INLINE_SIZE, 0))
      {
        timevar_push (TV_INTEGRATION);
        todo |= optimize_inline_calls (current_function_decl);

             reply	other threads:[~2009-10-22 13:30 UTC|newest]

Thread overview: 2+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2009-10-22 14:06 Jan Hubicka [this message]
2010-10-27 13:35 ` H.J. Lu

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=20091022133004.GE24874@kam.mff.cuni.cz \
    --to=hubicka@ucw.cz \
    --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).