From: David Edelsohn <dje.gcc@gmail.com>
To: Segher Boessenkool <segher@kernel.crashing.org>,
Jan Hubicka <hubicka@ucw.cz>
Cc: Ramana Radhakrishnan <ramana.gcc@googlemail.com>,
GCC Patches <gcc-patches@gcc.gnu.org>
Subject: Re: [PATCH] rs6000 branch probability changes
Date: Sat, 01 Jul 2017 12:59:00 -0000 [thread overview]
Message-ID: <CAGWvnymATYpA2cSuCrXfop62e_Ue=Tn5NXcMQNpnArRQffuHXQ@mail.gmail.com> (raw)
In-Reply-To: <20170630231825.GN16550@gate.crashing.org>
On Fri, Jun 30, 2017 at 7:18 PM, Segher Boessenkool
<segher@kernel.crashing.org> wrote:
> On Fri, Jun 30, 2017 at 10:36:27PM +0100, Ramana Radhakrishnan wrote:
>> On Fri, Jun 30, 2017 at 2:36 PM, David Edelsohn <dje.gcc@gmail.com> wrote:
>> > Convert the rs6000 port to use the new API for branch probabilities.
>> >
>> > Okay?
>> >
>> > Thanks, David
>> >
>> > * config/rs6000/rs6000.c (emit_unlikely_jump): Adjust to new branch
>> > probability data type.
>> >
>> > Index: rs6000.c
>> > ===================================================================
>> > --- rs6000.c (revision 249839)
>> > +++ rs6000.c (working copy)
>> > @@ -23514,10 +23514,9 @@
>> > static void
>> > emit_unlikely_jump (rtx cond, rtx label)
>> > {
>> > - int very_unlikely = REG_BR_PROB_BASE / 100 - 1;
>> > rtx x = gen_rtx_IF_THEN_ELSE (VOIDmode, cond, label, pc_rtx);
>> > rtx_insn *insn = emit_jump_insn (gen_rtx_SET (pc_rtx, x));
>> > - add_int_reg_note (insn, REG_BR_PROB, very_unlikely);
>> > + add_int_reg_note (insn, REG_BR_PROB, profile_probability::very_unlikely ());
>>
>> Hmmm isn't this very unlikely to work :) ?
>>
>> I used this as inspiration to do this for the arm ports but
>> add_int_reg_note expects an integer but very_unlikely returns
>> profile_probability ...
>
> It probably should be converted using to_reg_br_prob_base ?
The comments in profile-count.h state that this should go away.
We need advice from Honza about the preferred way to transform these idioms.
Thanks, David
next prev parent reply other threads:[~2017-07-01 12:59 UTC|newest]
Thread overview: 8+ messages / expand[flat|nested] mbox.gz Atom feed top
2017-06-30 13:36 David Edelsohn
2017-06-30 21:36 ` Ramana Radhakrishnan
2017-06-30 23:18 ` Segher Boessenkool
2017-07-01 12:59 ` David Edelsohn [this message]
2017-07-01 13:06 ` Jan Hubicka
2017-07-01 13:19 ` David Edelsohn
2017-07-01 13:23 ` Jan Hubicka
2017-07-01 13:34 ` Jan Hubicka
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='CAGWvnymATYpA2cSuCrXfop62e_Ue=Tn5NXcMQNpnArRQffuHXQ@mail.gmail.com' \
--to=dje.gcc@gmail.com \
--cc=gcc-patches@gcc.gnu.org \
--cc=hubicka@ucw.cz \
--cc=ramana.gcc@googlemail.com \
--cc=segher@kernel.crashing.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).