From: Andrew Pinski <pinskia@gmail.com>
To: Marcus Shawcroft <marcus.shawcroft@gmail.com>
Cc: "Gopalasubramanian, Ganesh" <Ganesh.Gopalasubramanian@amd.com>,
"gcc-patches@gcc.gnu.org" <gcc-patches@gcc.gnu.org>
Subject: Re: [PATCH, aarch64] Add prefetch support
Date: Sun, 11 Jan 2015 08:53:00 -0000 [thread overview]
Message-ID: <CA+=Sn1n_wX3QULyp5+y62gO4D3mN-SR-j58SQrh+FDCOshyZZA@mail.gmail.com> (raw)
In-Reply-To: <CAFqB+PzmnX6K203rpMmPJb6kY9aggX9-kkLgBUhkJoPTgWj5zg@mail.gmail.com>
On Tue, Nov 11, 2014 at 6:47 AM, Marcus Shawcroft
<marcus.shawcroft@gmail.com> wrote:
> On 30 October 2014 08:54, Gopalasubramanian, Ganesh
> <Ganesh.Gopalasubramanian@amd.com> wrote:
>
>> 2014-10-30 Ganesh Gopalasubramanian <Ganesh.Gopalasubramanian@amd.com>
>
> Check the whitespace in your ChangeLog line.
>
>> * config/arm/types.md (define_attr "type"): Add prefetch.
>
> The existing schedulers use 'load1'. We can of course split that into
> two introducing "prefetch" and update all of the existing schedulers
> to reflect the change. However I suggest we do that as a separate
> activity when someone actually needs the distinction, note this change
> will require updating the schedulers for both ARM and AArch64 backends
> not just those relevant to AArch64. For this prefetch patch I suggest
> we go with the existing "load1".
I will need this change for ThunderX schedule. The Pref instruction
is single issued while load1 can be dual issued.
Thanks,
Andrew
>
> The inline patch has been munged by your mailer, I tried applying the
> patch to my tree but it is full of escape sequences. Can you either
> fix your mailer or submit patches as attachments?
>
>> diff --git a/gcc/config/aarch64/aarch64.md b/gcc/config/aarch64/aarch64.md
>> index 74b554e..12a3f170 100644
>> --- a/gcc/config/aarch64/aarch64.md
>> +++ b/gcc/config/aarch64/aarch64.md
>> @@ -320,6 +320,38 @@
>> [(set_attr "type" "no_insn")]
>> )
>>
>> +
>> +(define_insn "prefetch"
>> + [(prefetch (match_operand:DI 0 "address_operand" "r")
>> + (match_operand:QI 1 "const_int_operand" "")
>> + (match_operand:QI 2 "const_int_operand" ""))]
>> + ""
>
>> + "*
>> +{
>
> Use {} instead of "*{, then all of the extra quoting in the C below goes away.
>
>> + const char * pftype[2][10]
>> + = { {\"PLDL1STRM\", \"PLDL3KEEP\", \"PLDL2KEEP\", \"PLDL1KEEP\"},
>> + {\"PSTL1STRM\", \"PSTL3KEEP\", \"PSTL2KEEP\", \"PSTL1KEEP\"},
>> + };
>> +
>> + int locality = INTVAL (operands[2]);
>> + char pattern[100];
>> +
>> + gcc_assert (IN_RANGE (locality, 0, 3));
>> +
>> + strcpy (pattern, \"prfm\\t\");
>> + strcat (pattern, (const char*)pftype[INTVAL(operands[1])][locality]);
>> + strcat (pattern, \", %a0\");
>
> Use sprintf() rather that multiple calls to cpy and cat. I suspect
> the cast in front of pftype is superflous?
>
>> +
>> + output_asm_insn (pattern,
>> + operands);
>
> Unnecessary line break.
>
> Cheers
> /Marcus
next prev parent reply other threads:[~2015-01-11 2:38 UTC|newest]
Thread overview: 15+ messages / expand[flat|nested] mbox.gz Atom feed top
2014-10-30 9:00 Gopalasubramanian, Ganesh
2014-11-11 14:48 ` Marcus Shawcroft
2014-11-14 20:45 ` Gopalasubramanian, Ganesh
2014-11-17 13:31 ` Richard Henderson
2014-12-01 6:13 ` Gopalasubramanian, Ganesh
2014-12-01 7:49 ` Gopalasubramanian, Ganesh
2014-12-02 0:09 ` Richard Henderson
2014-12-03 13:49 ` Marcus Shawcroft
2015-01-11 8:53 ` Andrew Pinski [this message]
2015-01-13 14:31 ` Marcus Shawcroft
2015-01-13 14:32 ` Andrew Pinski
2015-01-13 14:58 ` Dr. Philipp Tomsich
-- strict thread matches above, loose matches on Subject: below --
2014-07-04 10:57 Gopalasubramanian, Ganesh
2014-07-05 20:42 ` Gopalasubramanian, Ganesh
2014-07-09 8:54 ` Richard Earnshaw
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+=Sn1n_wX3QULyp5+y62gO4D3mN-SR-j58SQrh+FDCOshyZZA@mail.gmail.com' \
--to=pinskia@gmail.com \
--cc=Ganesh.Gopalasubramanian@amd.com \
--cc=gcc-patches@gcc.gnu.org \
--cc=marcus.shawcroft@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).