Re: re: [AArch64][Spec2017]Question about mlow-precision-div optimization.

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



bule <bule1@xxxxxxxxxx> 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@xxxxxxxxxx>
> +
> +       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@xxxxxxxxxx>
> +
> +       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@xxxxxxxxxx>

        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




[Index of Archives]     [Linux C Programming]     [Linux Kernel]     [eCos]     [Fedora Development]     [Fedora Announce]     [Autoconf]     [The DWARVES Debugging Tools]     [Yosemite Campsites]     [Yosemite News]     [Linux GCC]

  Powered by Linux