static bool
vect_build_slp_tree_1 (vec_info *vinfo, unsigned char *swap,
- vec<stmt_vec_info> stmts, unsigned int group_size,
+ vec<stmt_vec_info> stmts,
poly_uint64 *max_nunits, bool *matches,
bool *two_operators, tree *node_vectype)
{
+ unsigned int group_size = stmts.length ();
unsigned int i;
stmt_vec_info first_stmt_info = stmts[0];
code_helper first_stmt_code = ERROR_MARK;
static slp_tree
vect_build_slp_tree_2 (vec_info *vinfo, slp_tree node,
- vec<stmt_vec_info> stmts, unsigned int group_size,
+ vec<stmt_vec_info> stmts,
poly_uint64 *max_nunits,
bool *matches, unsigned *limit, unsigned *tree_size,
scalar_stmts_to_slp_tree_map_t *bst_map);
static slp_tree
vect_build_slp_tree (vec_info *vinfo,
- vec<stmt_vec_info> stmts, unsigned int group_size,
+ vec<stmt_vec_info> stmts,
poly_uint64 *max_nunits,
bool *matches, unsigned *limit, unsigned *tree_size,
scalar_stmts_to_slp_tree_map_t *bst_map)
{
+ unsigned int group_size = stmts.length ();
if (slp_tree *leader = bst_map->get (stmts))
{
if (dump_enabled_p ())
"starting SLP discovery for node %p\n", (void *) res);
poly_uint64 this_max_nunits = 1;
- slp_tree res_ = vect_build_slp_tree_2 (vinfo, res, stmts, group_size,
+ slp_tree res_ = vect_build_slp_tree_2 (vinfo, res, stmts,
&this_max_nunits,
matches, limit, tree_size, bst_map);
if (!res_)
static slp_tree
vect_build_slp_tree_2 (vec_info *vinfo, slp_tree node,
- vec<stmt_vec_info> stmts, unsigned int group_size,
+ vec<stmt_vec_info> stmts,
poly_uint64 *max_nunits,
bool *matches, unsigned *limit, unsigned *tree_size,
scalar_stmts_to_slp_tree_map_t *bst_map)
{
+ unsigned int group_size = stmts.length ();
unsigned nops, i, this_tree_size = 0;
poly_uint64 this_max_nunits = *max_nunits;
bool two_operators = false;
unsigned char *swap = XALLOCAVEC (unsigned char, group_size);
tree vectype = NULL_TREE;
- if (!vect_build_slp_tree_1 (vinfo, swap, stmts, group_size,
+ if (!vect_build_slp_tree_1 (vinfo, swap, stmts,
&this_max_nunits, matches, &two_operators,
&vectype))
return NULL;
}
bool *matches2 = XALLOCAVEC (bool, dr_group_size);
slp_tree unperm_load
- = vect_build_slp_tree (vinfo, stmts2, dr_group_size,
+ = vect_build_slp_tree (vinfo, stmts2,
&this_max_nunits, matches2, limit,
&this_tree_size, bst_map);
/* When we are able to do the full masked load emit that
else
op_stmts.quick_push (NULL);
child = vect_build_slp_tree (vinfo, op_stmts,
- group_size, &this_max_nunits,
+ &this_max_nunits,
matches, limit,
&this_tree_size, bst_map);
/* ??? We're likely getting too many fatal mismatches
vec<stmt_vec_info> def_stmts2;
def_stmts2.create (1);
def_stmts2.quick_push (oprnd_info->def_stmts[0]);
- child = vect_build_slp_tree (vinfo, def_stmts2, 1,
+ child = vect_build_slp_tree (vinfo, def_stmts2,
&this_max_nunits,
matches, limit,
&this_tree_size, bst_map);
else if (least_upthread_swappable_op_distance != -1U)
least_upthread_swappable_op_distance++;
child = vect_build_slp_tree (vinfo, oprnd_info->def_stmts,
- group_size, &this_max_nunits,
+ &this_max_nunits,
matches, limit,
&this_tree_size, bst_map);
least_upthread_swappable_op_distance = old_swap_distance;
/* And try again with scratch 'matches' ... */
bool *tem = XALLOCAVEC (bool, group_size);
if ((child = vect_build_slp_tree (vinfo, oprnd_info->def_stmts,
- group_size, &this_max_nunits,
+ &this_max_nunits,
tem, limit,
&this_tree_size, bst_map)) != NULL)
{
bool *matches = XALLOCAVEC (bool, group_size);
poly_uint64 max_nunits = 1;
unsigned tree_size = 0, limit = 1;
- node = vect_build_slp_tree (vinfo, stmts, group_size, &max_nunits,
+ node = vect_build_slp_tree (vinfo, stmts, &max_nunits,
matches, &limit, &tree_size, bst_map);
if (!node)
stmts.release ();
matches[1] = false;
}
else
- node = vect_build_slp_tree (vinfo, scalar_stmts, group_size,
+ node = vect_build_slp_tree (vinfo, scalar_stmts,
&max_nunits, matches, limit,
&tree_size, bst_map);
if (node != NULL)
bool *matches = XALLOCAVEC (bool, group_size);
poly_uint64 max_nunits = 1;
unsigned tree_size = 0;
- slp_tree node = vect_build_slp_tree (vinfo, scalar_stmts, group_size,
+ slp_tree node = vect_build_slp_tree (vinfo, scalar_stmts,
&max_nunits, matches, limit,
&tree_size, bst_map);
if (!node)
for (unsigned i = 0; i < scalar_stmts.length (); ++i)
REDUC_GROUP_FIRST_ELEMENT (scalar_stmts[i]) = scalar_stmts[0];
- slp_tree node = vect_build_slp_tree (vinfo, scalar_stmts, group_size,
+ slp_tree node = vect_build_slp_tree (vinfo, scalar_stmts,
&max_nunits, matches, limit,
&tree_size, bst_map);
poly_uint64 max_nunits = 1;
unsigned tree_size = 0;
- slp_tree node = vect_build_slp_tree (vinfo, scalar_stmts, group_size,
+ slp_tree node = vect_build_slp_tree (vinfo, scalar_stmts,
&max_nunits, matches, limit,
&tree_size, bst_map);
if (node != NULL)
poly_uint64 max_nunits = 1;
unsigned tree_size = 0;
slp_tree node = vect_build_slp_tree (loop_vinfo, scalar_stmts,
- group_size,
&max_nunits, matches, limit,
&tree_size, bst_map);
if (!node)
matches[1] = false;
}
else
- node = vect_build_slp_tree (vinfo, scalar_stmts, group_size,
+ node = vect_build_slp_tree (vinfo, scalar_stmts,
&max_nunits, matches, limit,
&tree_size, bst_map);
if (node != NULL)
for (unsigned j = start; j < end; ++j)
substmts.quick_push (scalar_stmts[j]);
max_nunits = 1;
- node = vect_build_slp_tree (vinfo, substmts, end - start,
+ node = vect_build_slp_tree (vinfo, substmts,
&max_nunits,
matches, limit, &tree_size, bst_map);
if (node)
unsigned limit = 1;
unsigned tree_size = 0;
slp_tree l0 = vect_build_slp_tree (loop_vinfo, stmts,
- group_lanes,
&max_nunits, matches, &limit,
&tree_size, bst_map);
gcc_assert (!SLP_TREE_LOAD_PERMUTATION (l0).exists ());