From: Richard Sandiford <richard.sandiford@arm.com>
To: bule <bule1@huawei.com>
Cc: "Yangfei \(Felix\)" <felix.yang@huawei.com>,
Wilco Dijkstra <Wilco.Dijkstra@arm.com>,
gcc-help <gcc-help@gcc.gnu.org>
Subject: Re: re: [AArch64][Spec2017]Question about mlow-precision-div optimization.
Date: Fri, 13 Mar 2020 09:30:40 +0000 [thread overview]
Message-ID: <mptv9n8d2kf.fsf@arm.com> (raw)
In-Reply-To: <8FB10B4CA53A144E918874949D50CEB10228DBF6@dggeml528-mbx.china.huawei.com> (bule's message of "Thu, 12 Mar 2020 12:22:49 +0000")
bule <bule1@huawei.com> writes:
> Hi,
>
>> Could you try doing a bootstrap with that change and seeing if it still works for your use case? If so, could you post the final patch?
>
> The bootstrap test and regression dejagnu test has been done on an aarch64 Linux platform for the patch attached.
> The regression test for gcc will have 4 extra expected passes automatically due to the newly added 2 parameters. No new regression witnessed.
> Newly added test cases are:
> PASS: gcc.dg/params/blocksort-part.c -O3 --param aarch64-double-recp-precision=1 (test for excess errors)
> PASS: gcc.dg/params/blocksort-part.c -O3 --param aarch64-double-recp-precision=5 (test for excess errors)
> PASS: gcc.dg/params/blocksort-part.c -O3 --param aarch64-float-recp-precision=1 (test for excess errors)
> PASS: gcc.dg/params/blocksort-part.c -O3 --param aarch64-float-recp-precision=5 (test for excess errors)
>
> gcc/config/aarch64/:
> +2020-03-12 Bu Le <bule1@huawei.com>
> +
> + PR target/94154
> + * aarch64.c (aarch64_emit_approx_div): Add new parameters
> + Add two parameters to control the precision of the reciprocal division.
> +
> + * aarch64.opt : Declare new parameters.
>
> gcc/doc:
> +2020-03-12 Bu Le <bule1@huawei.com>
> +
> + PR target/94154
> + * invoke.texi: New parameters added for reciprocal division precision.
> +
>
> please help commit this if it's OK to go
Thanks, looks good. Pushed to master with the minor changes below:
The changelog entries are relative to the innermost directory that
contains a ChangeLog file, so changes to gcc/doc and gcc/config/aarch64
have entries relative to gcc/. I used the following changelog for the
commit:
2020-03-13 Bu Le <bule1@huawei.com>
PR target/94154
* config/aarch64/aarch64.opt (-param=aarch64-float-recp-precision=)
(-param=aarch64-double-recp-precision=): New options.
* doc/invoke.texi: Document them.
* config/aarch64/aarch64.c (aarch64_emit_approx_div): Use them
instead of hard-coding the choice of 1 for float and 2 for double.
In:
> + iterations = (GET_MODE_INNER (mode) == DFmode)
> + ? aarch64_double_recp_precision
> + : aarch64_float_recp_precision;
the formatting should be:
iterations = (GET_MODE_INNER (mode) == DFmode
? aarch64_double_recp_precision
: aarch64_float_recp_precision);
with "?" and ":" indented below the character after the opening "(".
(GCC has quite strict rules about this kind of thing, sorry.)
In:
> +@item aarch64-float-recp-precision
> +The number of Newton iterations for calculating the reciprocal for float type.
> +The precision of division is propotional to this param
> +when divisionapproximation is enabled.
> +The default value is 1.
> +
> +@item aarch64-float-recp-precision
> +The number of Newton iterations for calculating the reciprocal for double type.
> +The precision of division is propotional to this param
> +when divisionapproximation is enabled.
> +The default value is 2.
there were a couple of typos:
- s/propotional/proportional/
- a missing space after "division"
Also, the second param should be "double" rather than "float".
Thanks,
Richard
next prev parent reply other threads:[~2020-03-13 9:30 UTC|newest]
Thread overview: 5+ messages / expand[flat|nested] mbox.gz Atom feed top
2020-03-12 12:22 bule
2020-03-13 9:30 ` Richard Sandiford [this message]
-- strict thread matches above, loose matches on Subject: below --
2020-03-13 10:06 bule
2020-03-09 1:48 bule
2020-03-09 12:28 ` Richard Sandiford
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=mptv9n8d2kf.fsf@arm.com \
--to=richard.sandiford@arm.com \
--cc=Wilco.Dijkstra@arm.com \
--cc=bule1@huawei.com \
--cc=felix.yang@huawei.com \
--cc=gcc-help@gcc.gnu.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).