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.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.c')
-rw-r--r-- | gcc/tree-vect-loop.c | 27 |
1 files changed, 14 insertions, 13 deletions
diff --git a/gcc/tree-vect-loop.c b/gcc/tree-vect-loop.c index 2f45d0d..da2a2ee 100644 --- a/gcc/tree-vect-loop.c +++ b/gcc/tree-vect-loop.c @@ -8207,21 +8207,18 @@ scale_profile_for_vect_loop (struct loop *loop, unsigned vf) scale_bbs_frequencies (&loop->latch, 1, exit_l->probability / prob); } -/* Vectorize STMT if relevant, inserting any new instructions before GSI. - When vectorizing STMT as a store, set *SEEN_STORE to its stmt_vec_info. +/* Vectorize STMT_INFO if relevant, inserting any new instructions before GSI. + When vectorizing STMT_INFO as a store, set *SEEN_STORE to its stmt_vec_info. *SLP_SCHEDULE is a running record of whether we have called vect_schedule_slp. */ static void -vect_transform_loop_stmt (loop_vec_info loop_vinfo, gimple *stmt, +vect_transform_loop_stmt (loop_vec_info loop_vinfo, stmt_vec_info stmt_info, gimple_stmt_iterator *gsi, stmt_vec_info *seen_store, bool *slp_scheduled) { struct loop *loop = LOOP_VINFO_LOOP (loop_vinfo); poly_uint64 vf = LOOP_VINFO_VECT_FACTOR (loop_vinfo); - stmt_vec_info stmt_info = loop_vinfo->lookup_stmt (stmt); - if (!stmt_info) - return; if (dump_enabled_p ()) { @@ -8476,15 +8473,19 @@ vect_transform_loop (loop_vec_info loop_vinfo) gimple *def_seq = STMT_VINFO_PATTERN_DEF_SEQ (stmt_info); for (gimple_stmt_iterator subsi = gsi_start (def_seq); !gsi_end_p (subsi); gsi_next (&subsi)) - vect_transform_loop_stmt (loop_vinfo, - gsi_stmt (subsi), &si, - &seen_store, - &slp_scheduled); - gimple *pat_stmt = STMT_VINFO_RELATED_STMT (stmt_info); - vect_transform_loop_stmt (loop_vinfo, pat_stmt, &si, + { + stmt_vec_info pat_stmt_info + = loop_vinfo->lookup_stmt (gsi_stmt (subsi)); + vect_transform_loop_stmt (loop_vinfo, pat_stmt_info, + &si, &seen_store, + &slp_scheduled); + } + stmt_vec_info pat_stmt_info + = STMT_VINFO_RELATED_STMT (stmt_info); + vect_transform_loop_stmt (loop_vinfo, pat_stmt_info, &si, &seen_store, &slp_scheduled); } - vect_transform_loop_stmt (loop_vinfo, stmt, &si, + vect_transform_loop_stmt (loop_vinfo, stmt_info, &si, &seen_store, &slp_scheduled); } if (seen_store) |