This is the mail archive of the gcc-patches@gcc.gnu.org mailing list for the GCC project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

Re: [070/nnn] poly_int: vectorizable_reduction


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


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]