public inbox for gcc-bugs@sourceware.org
help / color / mirror / Atom feed
From: "rguenth at gcc dot gnu.org" <gcc-bugzilla@gcc.gnu.org>
To: gcc-bugs@gcc.gnu.org
Subject: [Bug middle-end/55797] [4.8 Regression] ICE: verify_cgraph_node failed: edge has no corresponding call_stmt
Date: Tue, 08 Jan 2013 13:51:00 -0000	[thread overview]
Message-ID: <bug-55797-4-48i5cWAkao@http.gcc.gnu.org/bugzilla/> (raw)
In-Reply-To: <bug-55797-4@http.gcc.gnu.org/bugzilla/>


http://gcc.gnu.org/bugzilla/show_bug.cgi?id=55797

--- Comment #3 from Richard Biener <rguenth at gcc dot gnu.org> 2013-01-08 13:50:58 UTC ---
Eh, we do totally crazy (recursive) inlining here ...

struct section_info
{
  intrusive_ptr < section_info > parent;
};

struct file_info
{
  intrusive_ptr < file_info > parent;
  intrusive_ptr < section_info > switched_section;
};

so the simple

void
start_file (void)
{
  intrusive_ptr < file_info > parent;
}

creates and destroys the graph of file_info / section_info nodes
with the edges represented by intrusive_ptr's.

void start_file() ()
{
...
  <bb 2>:
  _5 = parent.px;
  if (_5 != 0B)
    goto <bb 3>;
  else
    goto <bb 1041> (<L3>);

  <bb 3>:
  _6 = &_5->switched_section;
  _7 = _6->px;
  if (_7 != 0B)
    goto <bb 4>;
  else
    goto <bb 6> (<L1>);

  <bb 4>:
  section_info::~section_info (_7);

  <bb 5>:
  operator delete (_7);
...
and 1000 calls follow.


I wonder why we need such high early-inlin-insns number and for lower we hit:

      else if ((n = num_calls (callee)) != 0
               && growth * (n + 1) > PARAM_VALUE (PARAM_EARLY_INLINING_INSNS))
        {
          if (dump_file)
            fprintf (dump_file, "  will not early inline: %s/%i->%s/%i, "
                     "growth %i exceeds --param early-inlining-insns "
                     "divided by number of calls\n",
                     xstrdup (cgraph_node_name (e->caller)), e->caller->uid,
                     xstrdup (cgraph_node_name (callee)), callee->uid,
                     growth);
          want_inline = false;
        }

of which I cannot make very much sense.  Why should the number of calls
in callee(!) times the growth matter?  Shouldn't this be the number
of times the caller calls callee?  And why even that?  We've gone completely
away from the "consider only if all calls can be inlined" way of early
inline operation!


  parent reply	other threads:[~2013-01-08 13:51 UTC|newest]

Thread overview: 14+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2012-12-23 11:04 [Bug middle-end/55797] New: " zsojka at seznam dot cz
2012-12-26 22:20 ` [Bug middle-end/55797] " pinskia at gcc dot gnu.org
2012-12-30 10:54 ` mpolacek at gcc dot gnu.org
2012-12-30 12:16 ` mpolacek at gcc dot gnu.org
2013-01-07 15:44 ` rguenth at gcc dot gnu.org
2013-01-08 13:51 ` rguenth at gcc dot gnu.org [this message]
2013-01-08 14:25 ` rguenth at gcc dot gnu.org
2013-01-23 13:29 ` hubicka at gcc dot gnu.org
2013-01-23 13:38 ` hubicka at gcc dot gnu.org
2013-01-23 13:49 ` jakub at gcc dot gnu.org
2013-01-23 13:57 ` hubicka at gcc dot gnu.org
2013-01-23 14:00 ` hubicka at gcc dot gnu.org
2013-01-23 14:20 ` hubicka at gcc dot gnu.org
2013-02-08 11:30 ` jakub at gcc dot gnu.org

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=bug-55797-4-48i5cWAkao@http.gcc.gnu.org/bugzilla/ \
    --to=gcc-bugzilla@gcc.gnu.org \
    --cc=gcc-bugs@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).