This is the mail archive of the
gcc-patches@gcc.gnu.org
mailing list for the GCC project.
Re: [PATCH] rs6000 branch probability changes
- From: Ramana Radhakrishnan <ramana dot gcc at googlemail dot com>
- To: David Edelsohn <dje dot gcc at gmail dot com>
- Cc: Segher Boessenkool <segher at kernel dot crashing dot org>, GCC Patches <gcc-patches at gcc dot gnu dot org>
- Date: Fri, 30 Jun 2017 22:36:27 +0100
- Subject: Re: [PATCH] rs6000 branch probability changes
- Authentication-results: sourceware.org; auth=none
- References: <CAGWvnyn9J43o0oQc7kwM87zFzyY+85q9WoZgh=yX=WVsye9Luw@mail.gmail.com>
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 ...
regards
Ramana
Ramana
> }
>
> /* A subroutine of the atomic operation splitters. Emit a load-locked