public inbox for gcc-patches@gcc.gnu.org
 help / color / mirror / Atom feed
From: Jeff Law <law@redhat.com>
To: Jan Hubicka <hubicka@ucw.cz>,
	Richard Biener <richard.guenther@gmail.com>
Cc: GCC Patches <gcc-patches@gcc.gnu.org>
Subject: Re: [PATCH] Allow FSM to thread single block cases too
Date: Wed, 14 Oct 2015 15:53:00 -0000	[thread overview]
Message-ID: <561E7A7D.5000407@redhat.com> (raw)
In-Reply-To: <20151014154341.GC16672@kam.mff.cuni.cz>

On 10/14/2015 09:43 AM, Jan Hubicka wrote:
>>>>> I think he asked for trivial forward threads though due to repeated
>>>>> tests.
>>>>> I hacked FRE to do this (I think), but maybe some trivial cleanup
>>>>> opportunities
>>>>> are still left here.  Honza?
>
> Well, unthreaded jumps quite confuse profile prediction and create profiles
> that we can't fix later. An of course they count in time (and size sometimes)
> estimates.
>
>  From cases I commonly see it is the usual lazyness of repeated tests comming
> from early inlining/macro expansion and also C++ love to introduce
>
>    if (ptr != NULL)
>      ptr2 = &ptr->foo;
>    else
>      ptr2 = NULL
>
> for instances of multiple inheritance. usually ptr is known to be non-NULL.
> And also cases where if is uses to check individual cases without having proper
> esles.
Yea.  I still  see a variety of trivial jump threads lying around early 
in the pipeline.

The nice thing about the backwards walking stuff in this context is we 
can control how hard it looks for jump threads much better.

The difficult thing is it's not currently prepared to find the implicit 
sets from conditionals.  Re-using the ASSERT_EXPR mechanisms from vrp 
may be the solution.  I haven't tried that yet, but it's in the back of 
my mind for solving that class of problems cleanly.



jeff

  reply	other threads:[~2015-10-14 15:53 UTC|newest]

Thread overview: 9+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2015-10-13 12:21 Jeff Law
2015-10-13 12:52 ` Richard Biener
2015-10-14 10:16   ` Richard Biener
2015-10-14 12:42     ` Jeff Law
2015-10-14 12:46       ` Richard Biener
2015-10-14 12:55         ` Jeff Law
2015-10-14 15:43         ` Jan Hubicka
2015-10-14 15:53           ` Jeff Law [this message]
2015-10-15  8:28             ` Richard Biener

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=561E7A7D.5000407@redhat.com \
    --to=law@redhat.com \
    --cc=gcc-patches@gcc.gnu.org \
    --cc=hubicka@ucw.cz \
    --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).