From: Sameera Deshpande Date: Tue, 14 Feb 2017 14:47:59 +0000 (+0530) Subject: Incremental changes to toT merge. X-Git-Url: http://git.ipfire.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=08a23481b346fa7ad671a6b5ec8351ac04117fcb;p=thirdparty%2Fgcc.git Incremental changes to toT merge. From-SVN: r245428 --- diff --git a/gcc/tree-vect-data-refs.c b/gcc/tree-vect-data-refs.c index 36a57e7eca51..289e19cf39cd 100644 --- a/gcc/tree-vect-data-refs.c +++ b/gcc/tree-vect-data-refs.c @@ -3328,28 +3328,35 @@ bool 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; @@ -3545,12 +3552,10 @@ vect_check_gather_scatter_1 (gimple *stmt, tree base, bool is_read, 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; } diff --git a/gcc/tree-vect-unified.c b/gcc/tree-vect-unified.c index 8b6acd67db1c..872d7d723202 100644 --- a/gcc/tree-vect-unified.c +++ b/gcc/tree-vect-unified.c @@ -222,14 +222,13 @@ new_stmt_attr () 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); @@ -2067,7 +2066,7 @@ is_ptree_complete (struct ITER_node *inode) static bool create_ptree (struct ITER_node *inode) { - auto_vec worklist; + vec worklist; bool is_ok; mark_probable_root_nodes (inode); diff --git a/gcc/tree-vectorizer.h b/gcc/tree-vectorizer.h index 743b31c3d243..97e4d5e40f97 100644 --- a/gcc/tree-vectorizer.h +++ b/gcc/tree-vectorizer.h @@ -1134,9 +1134,8 @@ extern bool vect_analyze_data_ref_accesses (vec_info *); 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 *, @@ -1178,7 +1177,7 @@ extern void vect_gen_vector_loop_niters (loop_vec_info, tree, tree *, bool); 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 *,