tree induction_index = NULL_TREE;
if (slp_node)
- group_size = SLP_TREE_SCALAR_STMTS (slp_node).length ();
+ group_size = SLP_TREE_LANES (slp_node);
if (nested_in_vect_loop_p (loop, stmt_info))
{
which each SLP statement has its own initial value and in which
that value needs to be repeated for every instance of the
statement within the initial vector. */
- unsigned int group_size = SLP_TREE_SCALAR_STMTS (slp_node).length ();
+ unsigned int group_size = SLP_TREE_LANES (slp_node);
if (!neutral_op
&& !can_duplicate_and_interleave_p (loop_vinfo, group_size,
TREE_TYPE (vectype_out)))
if (slp_node)
{
/* The size vect_schedule_slp_instance computes is off for us. */
- vec_num = vect_get_num_vectors
- (LOOP_VINFO_VECT_FACTOR (loop_vinfo)
- * SLP_TREE_SCALAR_STMTS (slp_node).length (), vectype_in);
+ vec_num = vect_get_num_vectors (LOOP_VINFO_VECT_FACTOR (loop_vinfo)
+ * SLP_TREE_LANES (slp_node), vectype_in);
ncopies = 1;
}
else
new_vec, step_vectype, NULL);
/* Now generate the IVs. */
- unsigned group_size = SLP_TREE_SCALAR_STMTS (slp_node).length ();
+ unsigned group_size = SLP_TREE_LANES (slp_node);
unsigned nvects = SLP_TREE_NUMBER_OF_VEC_STMTS (slp_node);
unsigned elts = const_nunits * nvects;
/* Compute the number of distinct IVs we need. First reduce
{
gcc_assert (slp_index >= 0);
- int num_scalar = SLP_TREE_SCALAR_STMTS (slp_node).length ();
+ int num_scalar = SLP_TREE_LANES (slp_node);
int num_vec = SLP_TREE_NUMBER_OF_VEC_STMTS (slp_node);
/* Get the last occurrence of the scalar index from the concatenation of
SLP_TREE_REPRESENTATIVE (this) = NULL;
this->refcnt = 1;
this->max_nunits = 1;
+ this->lanes = 0;
}
/* Tear down a SLP node. */
SLP_TREE_CHILDREN (node).create (nops);
SLP_TREE_DEF_TYPE (node) = vect_internal_def;
SLP_TREE_REPRESENTATIVE (node) = scalar_stmts[0];
+ SLP_TREE_LANES (node) = scalar_stmts.length ();
unsigned i;
stmt_vec_info stmt_info;
slp_tree node = new _slp_tree;
SLP_TREE_SCALAR_OPS (node) = ops;
SLP_TREE_DEF_TYPE (node) = vect_external_def;
+ SLP_TREE_LANES (node) = ops.length ();
return node;
}
SLP_TREE_DEF_TYPE (copy) = SLP_TREE_DEF_TYPE (node);
SLP_TREE_VECTYPE (copy) = SLP_TREE_VECTYPE (node);
SLP_TREE_REPRESENTATIVE (copy) = SLP_TREE_REPRESENTATIVE (node);
+ SLP_TREE_LANES (copy) = SLP_TREE_LANES (node);
copy->max_nunits = node->max_nunits;
copy->refcnt = 0;
if (SLP_TREE_SCALAR_STMTS (node).exists ())
a gap either because the group is larger than the SLP
group-size or because there is a gap between the groups. */
&& (known_eq (LOOP_VINFO_VECT_FACTOR (as_a <loop_vec_info> (vinfo)), 1U)
- || ((SLP_TREE_SCALAR_STMTS (node).length ()
- == DR_GROUP_SIZE (first_stmt_info))
+ || ((SLP_TREE_LANES (node) == DR_GROUP_SIZE (first_stmt_info))
&& DR_GROUP_GAP (first_stmt_info) == 0)))
{
SLP_TREE_LOAD_PERMUTATION (node).release ();
vf = loop_vinfo->vectorization_factor;
else
vf = 1;
- unsigned int group_size = SLP_TREE_SCALAR_STMTS (node).length ();
+ unsigned int group_size = SLP_TREE_LANES (node);
tree vectype = STMT_VINFO_VECTYPE (stmt_info);
SLP_TREE_NUMBER_OF_VEC_STMTS (node)
= vect_get_num_vectors (vf * group_size, vectype);
/* Don't remove and free the child nodes here, since they could be
referenced by other structures. The analysis and scheduling phases
(need to) ignore child nodes of anything that isn't vect_internal_def. */
- unsigned int group_size = SLP_TREE_SCALAR_STMTS (node).length ();
+ unsigned int group_size = SLP_TREE_LANES (node);
SLP_TREE_DEF_TYPE (node) = vect_external_def;
SLP_TREE_SCALAR_OPS (node).safe_grow (group_size);
FOR_EACH_VEC_ELT (SLP_TREE_SCALAR_STMTS (node), i, stmt_info)
FOR_EACH_VEC_ELT (slp_instances, i, instance)
{
auto_vec<bool, 20> life;
- life.safe_grow_cleared
- (SLP_TREE_SCALAR_STMTS (SLP_INSTANCE_TREE (instance)).length ());
+ life.safe_grow_cleared (SLP_TREE_LANES (SLP_INSTANCE_TREE (instance)));
vect_bb_slp_scalar_cost (bb_vinfo,
SLP_INSTANCE_TREE (instance),
&life, &scalar_costs, visited);
unpermuted sequence. In other cases we need to load the
whole group, not only the number of vector stmts the
permutation result fits in. */
- unsigned scalar_lanes = SLP_TREE_SCALAR_STMTS (slp_node).length ();
+ unsigned scalar_lanes = SLP_TREE_LANES (slp_node);
if (slp_perm
&& (group_size != scalar_lanes
|| !multiple_p (nunits, group_size)))
{
unsigned int group_size = 0;
if (node)
- {
- group_size = SLP_TREE_SCALAR_OPS (node).length ();
- if (group_size == 0)
- group_size = SLP_TREE_SCALAR_STMTS (node).length ();
- }
+ group_size = SLP_TREE_LANES (node);
return get_vectype_for_scalar_type (vinfo, scalar_type, group_size);
}
bool two_operators;
/* The DEF type of this node. */
enum vect_def_type def_type;
+ /* The number of scalar lanes produced by this node. */
+ unsigned int lanes;
};
#define SLP_TREE_DEF_TYPE(S) (S)->def_type
#define SLP_TREE_VECTYPE(S) (S)->vectype
#define SLP_TREE_REPRESENTATIVE(S) (S)->representative
+#define SLP_TREE_LANES(S) (S)->lanes
/* Key for map that records association between
scalar conditions and corresponding loop mask, and