/* These must come after the double widening ones. */
};
-const unsigned int NUM_PATTERNS = ARRAY_SIZE (vect_vect_recog_func_ptrs);
-
/* Mark statements that are involved in a pattern. */
void
static void
vect_pattern_recog_1 (vec_info *vinfo,
- vect_recog_func *recog_func, stmt_vec_info stmt_info)
+ const vect_recog_func &recog_func, stmt_vec_info stmt_info)
{
gimple *pattern_stmt;
tree pattern_vectype;
}
gcc_assert (!STMT_VINFO_PATTERN_DEF_SEQ (stmt_info));
- pattern_stmt = recog_func->fn (vinfo, stmt_info, &pattern_vectype);
+ pattern_stmt = recog_func.fn (vinfo, stmt_info, &pattern_vectype);
if (!pattern_stmt)
{
/* Clear any half-formed pattern definition sequence. */
if (dump_enabled_p ())
dump_printf_loc (MSG_NOTE, vect_location,
"%s pattern recognized: %G",
- recog_func->name, pattern_stmt);
+ recog_func.name, pattern_stmt);
/* Mark the stmts that are involved in the pattern. */
vect_mark_pattern_stmts (vinfo, stmt_info, pattern_stmt, pattern_vectype);
continue;
/* Scan over all generic vect_recog_xxx_pattern functions. */
- for (unsigned j = 0; j < NUM_PATTERNS; j++)
- vect_pattern_recog_1 (vinfo, &vect_vect_recog_func_ptrs[j],
+ for (const auto &func_ptr : vect_vect_recog_func_ptrs)
+ vect_pattern_recog_1 (vinfo, func_ptr,
stmt_info);
}
}