public inbox for gcc-patches@gcc.gnu.org
 help / color / mirror / Atom feed
From: "Martin Liška" <mliska@suse.cz>
To: Richard Biener <richard.guenther@gmail.com>
Cc: GCC Patches <gcc-patches@gcc.gnu.org>,
	Jan Hubicka <hubicka@ucw.cz>,
	ppalka@gcc.gnu.org
Subject: Re: [PATCH 4/N] Recover GOTO predictor.
Date: Mon, 31 Jul 2017 07:47:00 -0000	[thread overview]
Message-ID: <df8f10ac-56cb-66f9-326e-88b656c2b4a5@suse.cz> (raw)
In-Reply-To: <6f4e586d-befe-a7d3-ef53-346d731a99a7@suse.cz>

Richi?

Thanks

On 06/30/2017 03:48 PM, Martin Liška wrote:
> On 06/22/2017 12:27 PM, Richard Biener wrote:
>> On Wed, Jun 21, 2017 at 3:06 PM, Martin Liška <mliska@suse.cz> wrote:
>>> Hello.
>>>
>>> There's one additional predictor enhancement that is GOTO predict that
>>> used to working. Following patch adds expect statement for C and C++ family
>>> languages.
>>>
>>> There's one fallout which is vrp24.c test-case, where only 'Simplified relational'
>>> appears just once. Adding Richi and Patrick who can probably help how to fix the
>>> test-case.
>>
>> Happens to be optimized better now, there's only one predicate to simplify
>> left in the IL input to VRP1.  I suggest to change it to match 1 times and add
>> -fdump-tree-optimized to dg-options and
>>
>> /* { dg-final { scan-tree-dump-times "if " 3 "optimized" } } */
>>
>> to verify we have 3 conditions left.
> 
> One small note, I see 4 conditions in optimized dump:
> 
> sss (struct rtx_def * insn, int code1, int code2, int code3)
> {
>   int D1544;
>   struct rtx_def * body;
>   _Bool D1562;
> 
>   <bb 2> [100.00%] [count: INV]:
>   body_5 = insn_4(D)->u.fld[5].rt_rtx;
>   D1544_6 = body_5->code;
>   if (D1544_6 == 55)
>     goto <bb 7> (L7); [34.00%] [count: INV]
>   else
>     goto <bb 3>; [66.00%] [count: INV]
> 
>   <bb 3> [66.00%] [count: INV]:
>   if (code3_7(D) == 99)
>     goto <bb 4>; [34.00%] [count: INV]
>   else
>     goto <bb 8> (L16); [66.00%] [count: INV]
> 
>   <bb 4> [22.44%] [count: INV]:
>   D1562_9 = code1_8(D) == 10;
>   if (D1562_9 == 1)
>     goto <bb 7> (L7); [64.00%] [count: INV]
>   else
>     goto <bb 8> (L16); [36.00%] [count: INV]
> 
>   <bb 5> [9.82%] [count: INV]:
>   arf ();
> 
>   <bb 6> [46.68%] [count: INV]:
>   frob (); [tail call]
>   goto <bb 8> (L16); [100.00%] [count: INV]
> 
> L7 [48.36%] [count: INV]:
>   if (code2_12(D) == 42)
>     goto <bb 5>; [20.24%] [count: INV]
>   else
>     goto <bb 6>; [79.76%] [count: INV]
> 
> L16 [100.00%] [count: INV]:
>   return;
> 
> }
> 
> Is it a problem or adjusting to 4 is fine?
> 
> Martin
> 
>>
>>> Patch can bootstrap on ppc64le-redhat-linux and survives regression tests.
>>>
>>> Ready to be installed?
>>> Martin
> 

  reply	other threads:[~2017-07-31  7:47 UTC|newest]

Thread overview: 30+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2017-06-06  9:05 [PATCH 0/3] Rework early return and hot/cold label predictors marxin
2017-06-06  9:05 ` [PATCH 3/3] Rework cold and hot label attributes in predict.c marxin
2017-06-09 14:04   ` Jan Hubicka
2017-06-06  9:05 ` [PATCH 1/3] Come up with selftests for predict.c marxin
2017-06-06 10:44   ` David Malcolm
2017-06-08 12:30     ` Martin Liška
2017-06-08 13:09       ` David Malcolm
2017-06-08 23:07       ` Jan Hubicka
2017-06-06  9:05 ` [PATCH 2/3] Make early return predictor more precise marxin
2017-06-09 14:08   ` Jan Hubicka
2017-06-13 10:59     ` Martin Liška
2017-06-19 11:11       ` Jan Hubicka
2017-06-20 12:13         ` Martin Liška
2017-06-21  8:27           ` Jan Hubicka
2017-06-21 12:50             ` Martin Liška
2017-06-22 10:48               ` [PATCH] Fix ipa-split-5.c test-case Martin Liška
2017-06-22 14:14               ` [PATCH 2/3] Make early return predictor more precise Christophe Lyon
2017-06-23  7:03                 ` Martin Liška
2017-06-23  7:40                   ` Christophe Lyon
2017-06-21 13:06 ` [PATCH 4/N] Recover GOTO predictor Martin Liška
2017-06-21 13:09   ` Martin Liška
2017-06-22 10:27   ` Richard Biener
2017-06-22 10:57     ` Martin Liška
2017-06-22 11:47       ` Richard Biener
2017-06-30  9:24         ` Martin Liška
2017-06-30 12:37           ` Jan Hubicka
2017-06-30 13:48     ` Martin Liška
2017-07-31  7:47       ` Martin Liška [this message]
2017-07-31  8:55         ` Richard Biener
2017-07-31 23:05 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=df8f10ac-56cb-66f9-326e-88b656c2b4a5@suse.cz \
    --to=mliska@suse.cz \
    --cc=gcc-patches@gcc.gnu.org \
    --cc=hubicka@ucw.cz \
    --cc=ppalka@gcc.gnu.org \
    --cc=richard.guenther@gmail.com \
    /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).