public inbox for gcc-patches@gcc.gnu.org
 help / color / mirror / Atom feed
From: Andrew Pinski <pinskia@gmail.com>
To: Wilco Dijkstra <Wilco.Dijkstra@arm.com>
Cc: "Naveen.Hurugalawadi@cavium.com" <Naveen.Hurugalawadi@cavium.com>,
		"Andrew.pinski@cavium.com" <Andrew.pinski@cavium.com>,
	Kyrylo Tkachov <Kyrylo.Tkachov@arm.com>,
		James Greenhalgh <James.Greenhalgh@arm.com>, nd <nd@arm.com>,
		GCC Patches <gcc-patches@gcc.gnu.org>
Subject: Re: [PATCH][AArch64] Implement ALU_BRANCH fusion
Date: Tue, 21 Mar 2017 05:37:00 -0000	[thread overview]
Message-ID: <CA+=Sn1k0ptRuMu02zz+CFnPC99PazRyE_EbKurYjPLS8wH9w4A@mail.gmail.com> (raw)
In-Reply-To: <DB6PR0802MB2615C7C0031757AEE914E4C183270@DB6PR0802MB2615.eurprd08.prod.outlook.com>

On Wed, Mar 15, 2017 at 8:20 AM, Wilco Dijkstra <Wilco.Dijkstra@arm.com> wrote:
> Hi,
>
> I think the patch isn't quite complete yet. You will also need changes in
> generic code. Currently sched_macro_fuse_insns() does:
>
>   if (any_condjump_p (insn))
>     {
>       unsigned int condreg1, condreg2;
>       rtx cc_reg_1;
>       targetm.fixed_condition_code_regs (&condreg1, &condreg2);
>       cc_reg_1 = gen_rtx_REG (CCmode, condreg1);
>       prev = prev_nonnote_nondebug_insn (insn);
>       if (!reg_referenced_p (cc_reg_1, PATTERN (insn))
>           || !prev
>           || !modified_in_p (cc_reg_1, prev))
>         return;
>     }
>
> Ie. it explicitly looks for a flag-setting ALU instruction whose condition is
> used by a conditional branch, so none of the cases in your patch can match.
>
> Note this code also excludes all CBZ type branches as fusion candidates,
> is that intended too?

It is not intended that way; I did not even notice it after the
previous changes to make the macro_fusion more generic.  I wonder how
this code ever worked for the folks before we started to touch it :).

Naveen,
  Basically the idea is to push the check for CC usage into the target
macros (macro_fusion_pair_p in i386.c and aarch64.c are the only usage
of compare/branch fusion) instead of keeping it in the general code.

Also in aarch64.c's macro fusion you need check that the branch
instruction uses the same register as the other instruction sets like
the other code in this area.

Thanks,
Andrew Pinski



>
> Wilco

  reply	other threads:[~2017-03-21  5:37 UTC|newest]

Thread overview: 20+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
     [not found] <VI1PR0802MB26218E2C0940948518A0571783210@VI1PR0802MB2621.eurprd08.prod.outlook.com>
2017-03-15 15:20 ` Wilco Dijkstra
2017-03-21  5:37   ` Andrew Pinski [this message]
2017-03-27  7:33     ` Hurugalawadi, Naveen
2017-04-25  7:44       ` [PING][PATCH][AArch64] " Hurugalawadi, Naveen
2017-04-25 11:39         ` Wilco Dijkstra
2017-04-26 12:59           ` Hurugalawadi, Naveen
2017-04-26 14:29             ` Wilco Dijkstra
2017-04-27  7:32               ` Hurugalawadi, Naveen
2017-05-11  4:57                 ` [PING] [PATCH] [AArch64] " Hurugalawadi, Naveen
2017-05-26  7:14                   ` [PING 2] " Hurugalawadi, Naveen
2017-05-26 11:39                     ` Wilco Dijkstra
2017-06-14 10:29                       ` [PING 3] " Hurugalawadi, Naveen
2017-06-14 11:37                 ` [PING][PATCH][AArch64] " James Greenhalgh
2017-03-06  5:12 [PATCH][AArch64] " Hurugalawadi, Naveen
2017-03-08 18:04 ` James Greenhalgh
2017-03-09  6:22   ` Hurugalawadi, Naveen
2017-03-09 10:22     ` James Greenhalgh
2017-03-15  5:33       ` Hurugalawadi, Naveen
2017-03-15  9:23         ` Kyrill Tkachov
2017-03-15 10:04           ` Hurugalawadi, Naveen

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='CA+=Sn1k0ptRuMu02zz+CFnPC99PazRyE_EbKurYjPLS8wH9w4A@mail.gmail.com' \
    --to=pinskia@gmail.com \
    --cc=Andrew.pinski@cavium.com \
    --cc=James.Greenhalgh@arm.com \
    --cc=Kyrylo.Tkachov@arm.com \
    --cc=Naveen.Hurugalawadi@cavium.com \
    --cc=Wilco.Dijkstra@arm.com \
    --cc=gcc-patches@gcc.gnu.org \
    --cc=nd@arm.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).