Move computation of SLP_TREE_NUMBER_OF_VEC_STMTS
authorRichard Sandiford <richard.sandiford@linaro.org>
Mon, 18 Sep 2017 15:50:03 +0000 (15:50 +0000)
committerRichard Sandiford <rsandifo@gcc.gnu.org>
Mon, 18 Sep 2017 15:50:03 +0000 (15:50 +0000)
commit8b7e9dba2bc921c24994129bb9231caa176d6da5
treecf06fcaf6fcd2e2e9469de9c64d0f878f8b8231a
parentac8936b4677fa10b676e5b12aa682b9d2d42c1e5
Move computation of SLP_TREE_NUMBER_OF_VEC_STMTS

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_operations instead.

2017-09-18  Richard Sandiford  <richard.sandiford@linaro.org>
    Alan Hayward  <alan.hayward@arm.com>
    David Sherwood  <david.sherwood@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.

Co-Authored-By: Alan Hayward <alan.hayward@arm.com>
Co-Authored-By: David Sherwood <david.sherwood@arm.com>
From-SVN: r252935
gcc/ChangeLog
gcc/tree-vect-loop.c
gcc/tree-vect-slp.c
gcc/tree-vectorizer.h