This is the mail archive of the
gcc-patches@gcc.gnu.org
mailing list for the GCC project.
Re: [070/nnn] poly_int: vectorizable_reduction
- From: Jeff Law <law at redhat dot com>
- To: gcc-patches at gcc dot gnu dot org, richard dot sandiford at linaro dot org
- Date: Tue, 5 Dec 2017 17:32:55 -0700
- Subject: Re: [070/nnn] poly_int: vectorizable_reduction
- Authentication-results: sourceware.org; auth=none
- References: <871sltvm7r.fsf@linaro.org> <87h8upixih.fsf@linaro.org> <87tvxmp4mv.fsf@linaro.org>
On 11/22/2017 11:09 AM, Richard Sandiford wrote:
> Richard Sandiford <richard.sandiford@linaro.org> writes:
>> This patch makes vectorizable_reduction cope with variable-length vectors.
>> We can handle the simple case of an inner loop reduction for which
>> the target has native support for the epilogue operation. For now we
>> punt on other cases, but patches after the main SVE submission allow
>> SLP and double reductions too.
>
> Here's an updated version that applies on top of the recent removal
> of REDUC_*_EXPR.
>
> Thanks,
> Richard
>
>
> 2017-11-22 Richard Sandiford <richard.sandiford@linaro.org>
> Alan Hayward <alan.hayward@arm.com>
> David Sherwood <david.sherwood@arm.com>
>
> gcc/
> * tree.h (build_index_vector): Declare.
> * tree.c (build_index_vector): New function.
> * tree-vect-loop.c (get_initial_def_for_reduction): Treat the number
> of units as polynomial, forcibly converting it to a constant if
> vectorizable_reduction has already enforced the condition.
> (get_initial_defs_for_reduction): Likewise.
> (vect_create_epilog_for_reduction): Likewise. Use build_index_vector
> to create a {1,2,3,...} vector.
> (vectorizable_reduction): Treat the number of units as polynomial.
> Choose vectype_in based on the largest scalar element size rather
> than the smallest number of units. Enforce the restrictions
> relied on above.
I assume you'll work with Richi to address any conflicts with his patch
to allow the target to specify a preferred mode for final reductions
using shifts or extractions.
OK.
jeff