+2018-07-31 Richard Sandiford <richard.sandiford@arm.com>
+
+ * tree-vectorizer.h (vec_info::grouped_stores): Change from
+ an auto_vec<gimple *> to an auto_vec<stmt_vec_info>.
+ (_loop_vec_info::reduction_chains): Likewise.
+ * tree-vect-loop.c (vect_fixup_scalar_cycles_with_patterns): Update
+ accordingly.
+ * tree-vect-slp.c (vect_analyze_slp): Likewise.
+
2018-07-31 Richard Sandiford <richard.sandiford@arm.com>
* tree-vectorizer.h (_stmt_vec_info::first_element): Change from
static void
vect_fixup_scalar_cycles_with_patterns (loop_vec_info loop_vinfo)
{
- gimple *first;
+ stmt_vec_info first;
unsigned i;
FOR_EACH_VEC_ELT (LOOP_VINFO_REDUCTION_CHAINS (loop_vinfo), i, first)
- if (STMT_VINFO_IN_PATTERN_P (vinfo_for_stmt (first)))
+ if (STMT_VINFO_IN_PATTERN_P (first))
{
- stmt_vec_info next = REDUC_GROUP_NEXT_ELEMENT (vinfo_for_stmt (first));
+ stmt_vec_info next = REDUC_GROUP_NEXT_ELEMENT (first);
while (next)
{
if (! STMT_VINFO_IN_PATTERN_P (next))
{
vect_fixup_reduc_chain (first);
LOOP_VINFO_REDUCTION_CHAINS (loop_vinfo)[i]
- = STMT_VINFO_RELATED_STMT (vinfo_for_stmt (first));
+ = STMT_VINFO_RELATED_STMT (first);
}
}
}
vect_analyze_slp (vec_info *vinfo, unsigned max_tree_size)
{
unsigned int i;
- gimple *first_element;
+ stmt_vec_info first_element;
DUMP_VECT_SCOPE ("vect_analyze_slp");
max_tree_size))
{
/* Dissolve reduction chain group. */
- gimple *stmt = first_element;
- while (stmt)
+ stmt_vec_info vinfo = first_element;
+ while (vinfo)
{
- stmt_vec_info vinfo = vinfo_for_stmt (stmt);
stmt_vec_info next = REDUC_GROUP_NEXT_ELEMENT (vinfo);
REDUC_GROUP_FIRST_ELEMENT (vinfo) = NULL;
REDUC_GROUP_NEXT_ELEMENT (vinfo) = NULL;
- stmt = next;
+ vinfo = next;
}
- STMT_VINFO_DEF_TYPE (vinfo_for_stmt (first_element))
- = vect_internal_def;
+ STMT_VINFO_DEF_TYPE (first_element) = vect_internal_def;
}
}
/* All interleaving chains of stores, represented by the first
stmt in the chain. */
- auto_vec<gimple *> grouped_stores;
+ auto_vec<stmt_vec_info> grouped_stores;
/* Cost data used by the target cost model. */
void *target_cost_data;
/* All reduction chains in the loop, represented by the first
stmt in the chain. */
- auto_vec<gimple *> reduction_chains;
+ auto_vec<stmt_vec_info> reduction_chains;
/* Cost vector for a single scalar iteration. */
auto_vec<stmt_info_for_cost> scalar_cost_vec;