+2018-01-02 Richard Sandiford <richard.sandiford@linaro.org>
+
+ * optabs-query.h (can_vec_perm_p): Take a const vec_perm_indices *.
+ * optabs-query.c (can_vec_perm_p): Likewise.
+ * fold-const.c (fold_vec_perm): Take a const vec_perm_indices &
+ instead of vec_perm_indices.
+ * tree-vectorizer.h (vect_gen_perm_mask_any): Likewise,
+ (vect_gen_perm_mask_checked): Likewise,
+ * tree-vect-stmts.c (vect_gen_perm_mask_any): Likewise,
+ (vect_gen_perm_mask_checked): Likewise,
+
2018-01-02 Richard Sandiford <richard.sandiford@linaro.org>
* optabs-query.h (qimode_for_vec_perm): Declare.
NULL_TREE otherwise. */
static tree
-fold_vec_perm (tree type, tree arg0, tree arg1, vec_perm_indices sel)
+fold_vec_perm (tree type, tree arg0, tree arg1, const vec_perm_indices &sel)
{
unsigned int i;
bool need_ctor = false;
zeroes; this case is not dealt with here. */
bool
-can_vec_perm_p (machine_mode mode, bool variable, vec_perm_indices *sel)
+can_vec_perm_p (machine_mode mode, bool variable, const vec_perm_indices *sel)
{
machine_mode qimode;
enum insn_code can_fix_p (machine_mode, machine_mode, int, bool *);
bool can_conditionally_move_p (machine_mode mode);
opt_machine_mode qimode_for_vec_perm (machine_mode);
-bool can_vec_perm_p (machine_mode, bool, vec_perm_indices *);
+bool can_vec_perm_p (machine_mode, bool, const vec_perm_indices *);
/* Find a widening optab even if it doesn't widen as much as we want. */
#define find_widening_optab_handler(A, B, C) \
find_widening_optab_handler_and_mode (A, B, C, NULL)
vect_gen_perm_mask_checked. */
tree
-vect_gen_perm_mask_any (tree vectype, vec_perm_indices sel)
+vect_gen_perm_mask_any (tree vectype, const vec_perm_indices &sel)
{
tree mask_elt_type, mask_type;
i.e. that the target supports the pattern _for arbitrary input vectors_. */
tree
-vect_gen_perm_mask_checked (tree vectype, vec_perm_indices sel)
+vect_gen_perm_mask_checked (tree vectype, const vec_perm_indices &sel)
{
gcc_assert (can_vec_perm_p (TYPE_MODE (vectype), false, &sel));
return vect_gen_perm_mask_any (vectype, sel);
extern void vect_get_store_cost (struct data_reference *, int,
unsigned int *, stmt_vector_for_cost *);
extern bool vect_supportable_shift (enum tree_code, tree);
-extern tree vect_gen_perm_mask_any (tree, vec_perm_indices);
-extern tree vect_gen_perm_mask_checked (tree, vec_perm_indices);
+extern tree vect_gen_perm_mask_any (tree, const vec_perm_indices &);
+extern tree vect_gen_perm_mask_checked (tree, const vec_perm_indices &);
extern void optimize_mask_stores (struct loop*);
/* In tree-vect-data-refs.c. */