On 09/15/2017 04:43 AM, Richard Sandiford wrote:
> Previously SLP_TREE_NUMBER_OF_VEC_STMTS was calculated while scheduling
> an SLP tree after analysis, but sometimes it can be useful to know the
> value during analysis too. This patch moves the calculation to
> vect_slp_analyze_node_operaions instead.
>
> This became more natural after:
>
> 2017-06-30 Richard Biener <rguent...@suse.de>
>
> * tree-vect-slp.c (vect_slp_analyze_node_operations): Only
> analyze the first scalar stmt. Move vector type computation
> for the BB case here from ...
> * tree-vect-stmts.c (vect_analyze_stmt): ... here. Guard
> live operation processing in the SLP case properly.
>
> since the STMT_VINFO_VECTYPE is now always initialised in time.
>
> Tested on aarch64-linux-gnu, x86_64-linux-gnu and powerpc64le-linux-gnu.
> OK to install?
>
> Richard
>
>
> 2017-09-15 Richard Sandiford <richard.sandif...@linaro.org>
> Alan Hayward <alan.hayw...@arm.com>
> David Sherwood <david.sherw...@arm.com>
>
> gcc/
> * tree-vectorizer.h (vect_slp_analyze_operations): Replace parameters
> with a vec_info *.
> * tree-vect-loop.c (vect_analyze_loop_operations): Update call
> accordingly.
> * tree-vect-slp.c (vect_slp_analyze_node_operations): Add vec_info *
> parameter. Set SLP_TREE_NUMBER_OF_VEC_STMTS here rather than in
> vect_schedule_slp_instance.
> (vect_slp_analyze_operations): Replace parameters with a vec_info *.
> Update call to vect_slp_analyze_node_operations. Simplify return
> value.
> (vect_slp_analyze_bb_1): Update call accordingly.
> (vect_schedule_slp_instance): Remove vectorization_factor parameter.
> Don't calculate SLP_TREE_NUMBER_OF_VEC_STMTS here.
> (vect_schedule_slp): Update call accordingly.
OK.
jeff