diff options
author | Richard Sandiford <richard.sandiford@arm.com> | 2018-07-31 14:25:25 +0000 |
---|---|---|
committer | Richard Sandiford <rsandifo@gcc.gnu.org> | 2018-07-31 14:25:25 +0000 |
commit | 825702749aee7017548db2075cf225a6ed2e3ca8 (patch) | |
tree | b3fda8f76e10befacf3793ee21527d74c5d32c6f /gcc/tree-vect-loop-manip.c | |
parent | eca52fdd6c570658e417ab38d25e0874d0c9c044 (diff) | |
download | gcc-825702749aee7017548db2075cf225a6ed2e3ca8.zip gcc-825702749aee7017548db2075cf225a6ed2e3ca8.tar.gz gcc-825702749aee7017548db2075cf225a6ed2e3ca8.tar.bz2 |
[31/46] Use stmt_vec_info in function interfaces (part 1)
This first (less mechanical) part handles cases that involve changes in
the callers or non-trivial changes in the functions themselves.
2018-07-31 Richard Sandiford <richard.sandiford@arm.com>
gcc/
* tree-vect-data-refs.c (vect_describe_gather_scatter_call): Take
a stmt_vec_info instead of a gcall.
(vect_check_gather_scatter): Update call accordingly.
* tree-vect-loop-manip.c (iv_phi_p): Take a stmt_vec_info instead
of a gphi.
(vect_can_advance_ivs_p, vect_update_ivs_after_vectorizer)
(slpeel_update_phi_nodes_for_loops):): Update calls accordingly.
* tree-vect-loop.c (vect_transform_loop_stmt): Take a stmt_vec_info
instead of a gimple stmt.
(vect_transform_loop): Update calls accordingly.
* tree-vect-slp.c (vect_split_slp_store_group): Take and return
stmt_vec_infos instead of gimple stmts.
(vect_analyze_slp_instance): Update use accordingly.
* tree-vect-stmts.c (read_vector_array, write_vector_array)
(vect_clobber_variable, vect_stmt_relevant_p, permute_vec_elements)
(vect_use_strided_gather_scatters_p, vect_build_all_ones_mask)
(vect_build_zero_merge_argument, vect_get_gather_scatter_ops)
(vect_gen_widened_results_half, vect_get_loop_based_defs)
(vect_create_vectorized_promotion_stmts, can_vectorize_live_stmts):
Take a stmt_vec_info instead of a gimple stmt and pass stmt_vec_infos
down to subroutines.
From-SVN: r263146
Diffstat (limited to 'gcc/tree-vect-loop-manip.c')
-rw-r--r-- | gcc/tree-vect-loop-manip.c | 15 |
1 files changed, 8 insertions, 7 deletions
diff --git a/gcc/tree-vect-loop-manip.c b/gcc/tree-vect-loop-manip.c index f065854..251fc81 100644 --- a/gcc/tree-vect-loop-manip.c +++ b/gcc/tree-vect-loop-manip.c @@ -1335,16 +1335,16 @@ find_loop_location (struct loop *loop) return dump_user_location_t (); } -/* Return true if PHI defines an IV of the loop to be vectorized. */ +/* Return true if the phi described by STMT_INFO defines an IV of the + loop to be vectorized. */ static bool -iv_phi_p (gphi *phi) +iv_phi_p (stmt_vec_info stmt_info) { + gphi *phi = as_a <gphi *> (stmt_info->stmt); if (virtual_operand_p (PHI_RESULT (phi))) return false; - stmt_vec_info stmt_info = vinfo_for_stmt (phi); - gcc_assert (stmt_info != NULL_STMT_VEC_INFO); if (STMT_VINFO_DEF_TYPE (stmt_info) == vect_reduction_def || STMT_VINFO_DEF_TYPE (stmt_info) == vect_double_reduction_def) return false; @@ -1388,7 +1388,7 @@ vect_can_advance_ivs_p (loop_vec_info loop_vinfo) virtual defs/uses (i.e., memory accesses) are analyzed elsewhere. Skip reduction phis. */ - if (!iv_phi_p (phi)) + if (!iv_phi_p (phi_info)) { if (dump_enabled_p ()) dump_printf_loc (MSG_NOTE, vect_location, @@ -1509,7 +1509,7 @@ vect_update_ivs_after_vectorizer (loop_vec_info loop_vinfo, } /* Skip reduction and virtual phis. */ - if (!iv_phi_p (phi)) + if (!iv_phi_p (phi_info)) { if (dump_enabled_p ()) dump_printf_loc (MSG_NOTE, vect_location, @@ -2088,7 +2088,8 @@ slpeel_update_phi_nodes_for_loops (loop_vec_info loop_vinfo, tree arg = PHI_ARG_DEF_FROM_EDGE (orig_phi, first_latch_e); /* Generate lcssa PHI node for the first loop. */ gphi *vect_phi = (loop == first) ? orig_phi : update_phi; - if (create_lcssa_for_iv_phis || !iv_phi_p (vect_phi)) + stmt_vec_info vect_phi_info = loop_vinfo->lookup_stmt (vect_phi); + if (create_lcssa_for_iv_phis || !iv_phi_p (vect_phi_info)) { tree new_res = copy_ssa_name (PHI_RESULT (orig_phi)); gphi *lcssa_phi = create_phi_node (new_res, between_bb); |