public inbox for gcc-bugs@sourceware.org
help / color / mirror / Atom feed
From: "pinskia at gcc dot gnu dot org" <gcc-bugzilla@gcc.gnu.org>
To: gcc-bugs@gcc.gnu.org
Subject: [Bug tree-optimization/31081] [4.3 Regression] Inliner messes up SSA for abnormals
Date: Mon, 03 Dec 2007 02:44:00 -0000	[thread overview]
Message-ID: <20071203024407.21601.qmail@sourceware.org> (raw)
In-Reply-To: <bug-31081-6528@http.gcc.gnu.org/bugzilla/>



------- Comment #9 from pinskia at gcc dot gnu dot org  2007-12-03 02:44 -------
>From PR 30604:
 OK, new investigation show that using the smaller testcase firebird2-nav.cc
shows the inliner is misbehaving. 

before inlining  (*041t.profile):

  # BLOCK 2 freq:10000
  # PRED: ENTRY [100.0%]  (fallthru,exec)
  D.2709_4 = request_3(D)->req_pool;
  D.2710_5 = (struct blk *) D.2709_4;
  D.2711_6 = request_3(D)->req_transaction;
  D.2712_10 = VIO_get (tdbb_7(D), rpb_8(D), rsb_9(D), D.2711_6, D.2710_5);
  # SUCC: 4 (ab,eh,exec) 3 [100.0%]  (fallthru,exec)

  # BLOCK 3 freq:10000
  # PRED: 2 [100.0%]  (fallthru,exec)
  result_12(ab) = (BOOLEAN) D.2712_10;
<...>
  BTR_key (tdbb_7(D), D.2719_20, D.2718_19, D.2717_18, &value, 0B);
  goto <bb 5>;
  # SUCC: 4 (ab,eh,exec) 5 [100.0%]  (fallthru,exec)

  # BLOCK 4
  # PRED: 2 (ab,eh,exec) 3 (ab,eh,exec)
  # result_1(ab) = PHI <result_11(ab)(2), result_12(ab)(3)>
<L0>:;
  <...>

 # BLOCK 5 freq:10000
  # PRED: 3 [100.0%]  (fallthru,exec) 4 [100.0%]  (fallthru,exec)
  # result_2 = PHI <result_12(ab)(3), result_1(ab)(4)>
  return result_2;
  # SUCC: EXIT [100.0%]



and after inlining (*046i.inline) we see:



<bb 2>:

<bb 7>:
  D.2882_11 = request_9(D)->req_pool;
  D.2883_12 = (struct blk *) D.2882_11;
  D.2884_13 = request_9(D)->req_transaction;
  D.2885_14 = VIO_get (tdbb_8(D), rpb_3(D), rsb_1(D), D.2884_13, D.2883_12);

<bb 3>:
  result_15(ab) = (BOOLEAN) D.2885_14;
<...>
  BTR_key (tdbb_8(D), D.2892_22, D.2891_21, D.2890_20, &value, 0B);
  goto <bb 5>;

  # result_24(ab) = PHI <result_10(ab)(7), result_15(ab)(3)>
<L4>:;
<...>

<bb 5>:
  # result_23 = PHI <result_15(ab)(3), result_24(ab)(4)>
  if (result_23 != 0)
    goto <bb 6>;
  else
    goto <bb 7>;

<bb 6>:
  return 1;



Basic block 7 is missing a PHI node which should merge result_23 and result_10.
 The result of this missing PHI should then be used in block 5 instead of
result_10.

The way it currently sits, result 10 is live through basic block 3, which makes
it conflict with result_15, and makes the abnormal edges uncoalescable.

Someone familiar with the inliner can probably fix this quickly. I took a quick
look but its a different world in there :-)


-- 


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


  parent reply	other threads:[~2007-12-03  2:44 UTC|newest]

Thread overview: 21+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2007-03-08 12:32 [Bug middle-end/31081] New: " pinskia at gcc dot gnu dot org
2007-03-08 12:33 ` [Bug middle-end/31081] " pinskia at gcc dot gnu dot org
2007-03-08 12:37 ` pinskia at gcc dot gnu dot org
2007-06-29 18:02 ` mmitchel at gcc dot gnu dot org
2007-10-22 16:34 ` [Bug tree-optimization/31081] " janis at gcc dot gnu dot org
2007-10-22 22:34 ` kuba at et dot pl
2007-10-28 19:09 ` hubicka at gcc dot gnu dot org
2007-10-30  6:51 ` victork at gcc dot gnu dot org
2007-10-31 12:24 ` rguenth at gcc dot gnu dot org
2007-11-16  1:19 ` kuba at et dot pl
2007-12-03  2:44 ` pinskia at gcc dot gnu dot org [this message]
2007-12-03 18:11 ` jakub at gcc dot gnu dot org
2007-12-16 18:13 ` ebotcazou at gcc dot gnu dot org
2007-12-16 19:31 ` pinskia at gcc dot gnu dot org
2007-12-18 11:42 ` hubicka at gcc dot gnu dot org
2007-12-18 18:54 ` hubicka at gcc dot gnu dot org
2007-12-18 23:31 ` jakub at gcc dot gnu dot org
2007-12-29 22:31 ` hubicka at gcc dot gnu dot org
2008-01-03 21:54 ` hubicka at gcc dot gnu dot org
2008-01-04 11:32 ` rguenth at gcc dot gnu dot org
2008-01-04 12:50 ` rguenth at gcc dot gnu dot 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=20071203024407.21601.qmail@sourceware.org \
    --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).