]> git.ipfire.org Git - thirdparty/gcc.git/commit - gcc/tree-vect-stmts.c
poly_int: vect_nunits_for_cost
authorRichard Sandiford <richard.sandiford@linaro.org>
Wed, 3 Jan 2018 07:14:24 +0000 (07:14 +0000)
committerRichard Sandiford <rsandifo@gcc.gnu.org>
Wed, 3 Jan 2018 07:14:24 +0000 (07:14 +0000)
commitc5126ce8cae4f14194414e266be91fdc4b756807
tree29831b5b373d49c9f075dd2deed5f3e977c7e9fc
parent4b6068eadcf9801b9ef4e5f1b7b6354947c27ca8
poly_int: vect_nunits_for_cost

This patch adds a function for getting the number of elements in
a vector for cost purposes, which is always constant.  It makes
it possible for a later patch to change GET_MODE_NUNITS and
TYPE_VECTOR_SUBPARTS to a poly_int.

2018-01-03  Richard Sandiford  <richard.sandiford@linaro.org>
    Alan Hayward  <alan.hayward@arm.com>
    David Sherwood  <david.sherwood@arm.com>

gcc/
* tree-vectorizer.h (vect_nunits_for_cost): New function.
* tree-vect-loop.c (vect_model_reduction_cost): Use it.
* tree-vect-slp.c (vect_analyze_slp_cost_1): Likewise.
(vect_analyze_slp_cost): Likewise.
* tree-vect-stmts.c (vect_model_store_cost): Likewise.
(vect_model_load_cost): Likewise.

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