+2019-10-21 Richard Sandiford <richard.sandiford@arm.com>
+
+ * tree-vectorizer.h (duplicate_and_interleave): Take a vec_info.
+ * tree-vect-slp.c (duplicate_and_interleave): Likewise.
+ (vect_get_constant_vectors): Update call accordingly.
+ * tree-vect-loop.c (get_initial_defs_for_reduction): Likewise.
+
2019-10-21 Richard Sandiford <richard.sandiford@arm.com>
* tree-vectorizer.h (get_vectype_for_scalar_type): Take a vec_info.
{
vec<stmt_vec_info> stmts = SLP_TREE_SCALAR_STMTS (slp_node);
stmt_vec_info stmt_vinfo = stmts[0];
+ vec_info *vinfo = stmt_vinfo->vinfo;
unsigned HOST_WIDE_INT nunits;
unsigned j, number_of_places_left_in_vector;
tree vector_type;
{
/* First time round, duplicate ELTS to fill the
required number of vectors. */
- duplicate_and_interleave (&ctor_seq, vector_type, elts,
+ duplicate_and_interleave (vinfo, &ctor_seq, vector_type, elts,
number_of_vectors, *vec_oprnds);
break;
}
to cut down on the number of interleaves. */
void
-duplicate_and_interleave (gimple_seq *seq, tree vector_type, vec<tree> elts,
- unsigned int nresults, vec<tree> &results)
+duplicate_and_interleave (vec_info *, gimple_seq *seq, tree vector_type,
+ vec<tree> elts, unsigned int nresults,
+ vec<tree> &results)
{
unsigned int nelts = elts.length ();
tree element_type = TREE_TYPE (vector_type);
else
{
if (vec_oprnds->is_empty ())
- duplicate_and_interleave (&ctor_seq, vector_type, elts,
- number_of_vectors,
+ duplicate_and_interleave (vinfo, &ctor_seq, vector_type,
+ elts, number_of_vectors,
permute_results);
vec_cst = permute_results[number_of_vectors - j - 1];
}
extern bool can_duplicate_and_interleave_p (unsigned int, machine_mode,
unsigned int * = NULL,
tree * = NULL, tree * = NULL);
-extern void duplicate_and_interleave (gimple_seq *, tree, vec<tree>,
- unsigned int, vec<tree> &);
+extern void duplicate_and_interleave (vec_info *, gimple_seq *, tree,
+ vec<tree>, unsigned int, vec<tree> &);
extern int vect_get_place_in_interleaving_chain (stmt_vec_info, stmt_vec_info);
/* In tree-vect-patterns.c. */