From: Andrew MacLeod <amacleod@redhat.com>
To: Jan Hubicka <hubicka@ucw.cz>
Cc: Richard Guenther <richard.guenther@gmail.com>,
Jan Hubicka <jh@suse.cz>,
gcc-patches@gcc.gnu.org, dnovillo@google.com
Subject: Re: Continue stmt branch prediction
Date: Thu, 14 Feb 2008 18:27:00 -0000 [thread overview]
Message-ID: <47B4844D.2010007@redhat.com> (raw)
In-Reply-To: <20080214174122.GA32085@atrey.karlin.mff.cuni.cz>
Jan Hubicka wrote:
>> Wouldn't it be easier to add a unlikely_goto stmt for all these and translate
>> that to edge probabilities once we build the cfg? That is, stick the unlikely
>> bit onto the goto stmt instead of having an extra predict_expr floating around.
>>
>
> We've disucussed this few mails back. The problem is that if you have
> something like
>
> if (something)
> something2
> goto somewhere else
>
> somewhere else:
> something_else
>
> then after gimplifing we get
>
>
> if (something) goto around
> something2
> somewehre_else
> around:
>
> and goto is gone. It is really more a property of the some specific
>
This example doesn't seem right. You've just changed the meaning of the
'if' in your example... At least the way I read it. you are no longer
executing 'something2' if 'something' is true, nor executing 'something
else' on both paths as in the original case. There are too many
different things you could have meant for me to guess exactly what you
did mean :-)
I'll try tho :-)
Did you perhaps mean to reverse the condition to if (!something) in the
latter case? If so, then you seem to be arguing that since the original
'if''s code segment contained an explicit GOTO, that the end result is
we should predict that it is unlikely to be taken, and therefore we
should predict that the 'if (!something) goto around' branch *will* be
taken after gimplifying, and that we lose that info.
Is that correct or were you trying to say something else?
Andrew
next prev parent reply other threads:[~2008-02-14 18:11 UTC|newest]
Thread overview: 27+ messages / expand[flat|nested] mbox.gz Atom feed top
2008-02-09 20:59 Jan Hubicka
2008-02-10 14:00 ` Diego Novillo
2008-02-10 15:49 ` Jan Hubicka
2008-02-11 2:51 ` Diego Novillo
2008-02-11 8:21 ` Jan Hubicka
2008-02-11 22:42 ` Andrew MacLeod
2008-02-14 15:31 ` Jan Hubicka
2008-02-14 15:38 ` Richard Guenther
2008-02-14 17:49 ` Jan Hubicka
2008-02-14 18:27 ` Andrew MacLeod [this message]
2008-02-14 19:12 ` Jan Hubicka
2008-02-14 15:45 ` Andrew MacLeod
2008-02-14 18:11 ` Jan Hubicka
2008-03-05 18:33 ` Jan Hubicka
2008-03-05 22:10 ` Diego Novillo
2008-03-05 22:28 ` Jan Hubicka
2008-03-12 17:54 ` Diego Novillo
2008-03-13 1:38 ` Jan Hubicka
2008-03-13 1:41 ` Jan Hubicka
2008-03-13 9:21 ` Richard Guenther
2008-03-13 14:12 ` Diego Novillo
2008-03-19 6:33 ` H.J. Lu
2008-03-19 11:25 ` Jan Hubicka
2008-03-19 11:37 ` Richard Guenther
2008-03-19 11:45 ` Jan Hubicka
2008-03-19 13:21 ` Richard Guenther
2008-02-20 22:53 Bradley Lucier
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=47B4844D.2010007@redhat.com \
--to=amacleod@redhat.com \
--cc=dnovillo@google.com \
--cc=gcc-patches@gcc.gnu.org \
--cc=hubicka@ucw.cz \
--cc=jh@suse.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).