Make gimple_build_vector take a tree_vector_builder
authorRichard Sandiford <richard.sandiford@linaro.org>
Thu, 7 Dec 2017 18:41:59 +0000 (18:41 +0000)
committerRichard Sandiford <rsandifo@gcc.gnu.org>
Thu, 7 Dec 2017 18:41:59 +0000 (18:41 +0000)
commitabe73c3d32b68809628eaa3266bf98cb7352851c
treef651282f43b411a678d09f3e8beca08fb288a564
parentb3def403fa7ae89679468b8f986cab7361c1034d
Make gimple_build_vector take a tree_vector_builder

This patch changes gimple_build_vector so that it takes a
tree_vector_builder instead of a size and a vector of trees.

2017-12-07  Richard Sandiford  <richard.sandiford@linaro.org>

gcc/
* vector-builder.h (vector_builder::derived): New const overload.
(vector_builder::elt): New function.
* tree-vector-builder.h (tree_vector_builder::type): New function.
(tree_vector_builder::apply_step): Declare.
* tree-vector-builder.c (tree_vector_builder::apply_step): New
function.
* gimple-fold.h (tree_vector_builder): Declare.
(gimple_build_vector): Take a tree_vector_builder instead of a
type and vector of elements.
* gimple-fold.c (gimple_build_vector): Likewise.
* tree-vect-loop.c (get_initial_def_for_reduction): Update call
accordingly.
(get_initial_defs_for_reduction): Likewise.
(vectorizable_induction): Likewise.

From-SVN: r255478
gcc/ChangeLog
gcc/gimple-fold.c
gcc/gimple-fold.h
gcc/tree-vect-loop.c
gcc/tree-vector-builder.c
gcc/tree-vector-builder.h
gcc/vector-builder.h