[27/46] Remove duplicated stmt_vec_info lookups
authorRichard Sandiford <richard.sandiford@arm.com>
Tue, 31 Jul 2018 14:24:02 +0000 (14:24 +0000)
committerRichard Sandiford <rsandifo@gcc.gnu.org>
Tue, 31 Jul 2018 14:24:02 +0000 (14:24 +0000)
commit91987857e694109fa312c9d2d83785aee5fb9c28
tree3b452bba62175cb7ca1c21add51e201f53792dd3
parentbeb456c375ea71d57e35400e9b7107e09e996965
[27/46] Remove duplicated stmt_vec_info lookups

Various places called vect_dr_stmt or vinfo_for_stmt multiple times
on the same input.  This patch makes them reuse the earlier result.
It also splits a couple of single vinfo_for_stmt calls out into
separate statements so that they can be reused in later patches.

2018-07-31  Richard Sandiford  <richard.sandiford@arm.com>

gcc/
* tree-vect-data-refs.c (vect_analyze_data_ref_dependence)
(vect_slp_analyze_node_dependences, vect_analyze_data_ref_accesses)
(vect_permute_store_chain, vect_permute_load_chain)
(vect_shift_permute_load_chain, vect_transform_grouped_load): Avoid
repeated stmt_vec_info lookups.
* tree-vect-loop-manip.c (vect_can_advance_ivs_p): Likewise.
(vect_update_ivs_after_vectorizer): Likewise.
* tree-vect-loop.c (vect_is_simple_reduction): Likewise.
(vect_create_epilog_for_reduction, vectorizable_reduction): Likewise.
* tree-vect-patterns.c (adjust_bool_stmts): Likewise.
* tree-vect-slp.c (vect_analyze_slp_instance): Likewise.
(vect_bb_slp_scalar_cost): Likewise.
* tree-vect-stmts.c (get_group_alias_ptr_type): Likewise.

From-SVN: r263142
gcc/ChangeLog
gcc/tree-vect-data-refs.c
gcc/tree-vect-loop-manip.c
gcc/tree-vect-loop.c
gcc/tree-vect-patterns.c
gcc/tree-vect-slp.c
gcc/tree-vect-stmts.c