vect_check_gather_scatter (gimple *stmt, loop_vec_info loop_vinfo,
gather_scatter_info *info)
{
+ tree *basep, *offp, *declp;
+ int *scalep;
+ bool retval;
struct loop *loop = LOOP_VINFO_LOOP (loop_vinfo);
stmt_vec_info stmt_info = vinfo_for_stmt (stmt);
struct data_reference *dr = STMT_VINFO_DATA_REF (stmt_info);
- tree base;
- bool is_read;
- tree vec_type;
- base = DR_REF (dr);
- is_read = DR_IS_READ (dr);
- vec_type = STMT_VINFO_VECTYPE (stmt_info);
- return vect_check_gather_scatter_1 (stmt, base, is_read, loop, vec_type,
- basep, offp, scalep);
+ retval = vect_check_gather_scatter_1 (stmt, DR_REF (dr), DR_IS_READ (dr),
+ loop, STMT_VINFO_VECTYPE (stmt_info),
+ basep, offp, scalep, declp);
+
+ info->decl = *declp;
+ info->base = *basep;
+ info->offset = *offp;
+ info->offset_dt = vect_unknown_def_type;
+ info->offset_vectype = NULL_TREE;
+ info->scale = *scalep;
+
+ return retval;
}
/* Check whether a non-affine read or write in stmt is suitable for gather load
or scatter store and if so, return a builtin decl for that operation. */
-tree
+bool
vect_check_gather_scatter_1 (gimple *stmt, tree base, bool is_read,
struct loop *loop, tree vec_type, tree *basep,
- tree *offp, int *scalep)
+ tree *offp, int *scalep, tree *declp)
{
HOST_WIDE_INT scale = 1, pbitpos, pbitsize;
tree offtype = NULL_TREE;
if (decl == NULL_TREE)
return false;
- info->decl = decl;
- info->base = base;
- info->offset = off;
- info->offset_dt = vect_unknown_def_type;
- info->offset_vectype = NULL_TREE;
- info->scale = scale;
+ *declp = decl;
+ *basep = base;
+ *offp = off;
+ *scalep = scale;
return true;
}
static struct ITER_node *
vect_populate_iter_node_from_loop (struct loop *loop)
{
- tree number_of_iterations, number_of_iterationsm1;
+ tree number_of_iterations, number_of_iterationsm1, assumptions;
basic_block *bbs;
gcond *loop_cond, *inner_loop_cond = NULL;
int i;
gimple_stmt_iterator si;
- if (! vect_analyze_loop_form_1 (loop, &loop_cond, &number_of_iterationsm1,
- &number_of_iterations, &inner_loop_cond))
+ if (! vect_analyze_loop_form_1 (loop, &loop_cond, &assumptions, &number_of_iterationsm1, &number_of_iterations, &inner_loop_cond))
return NULL;
struct ITER_node * t_iter_node = new_iter_node (loop);
static bool
create_ptree (struct ITER_node *inode)
{
- auto_vec<gimple *, 64> worklist;
+ vec<gimple *> worklist;
bool is_ok;
mark_probable_root_nodes (inode);
extern bool vect_prune_runtime_alias_test_list (loop_vec_info);
extern bool vect_check_gather_scatter (gimple *, loop_vec_info,
gather_scatter_info *);
-extern tree vect_check_gather_scatter_1 (gimple *, tree, bool, struct loop *,
- tree, tree *, tree *, int *);
-
+extern bool vect_check_gather_scatter_1 (gimple *, tree, bool, struct loop *,
+ tree, tree *, tree *, int *, tree *);
extern bool vect_analyze_data_refs (vec_info *, int *);
extern tree vect_create_data_ref_ptr (gimple *, tree, struct loop *, tree,
tree *, gimple_stmt_iterator *,
extern struct loop *vect_transform_loop (loop_vec_info);
extern loop_vec_info vect_analyze_loop_form (struct loop *);
extern bool vect_analyze_loop_form_1 (struct loop *, gcond **, tree *, tree *,
- gcond **);
+ tree *, gcond **);
extern bool vectorizable_live_operation (gimple *, gimple_stmt_iterator *,
slp_tree, int, gimple **);
extern bool vectorizable_reduction (gimple *, gimple_stmt_iterator *,