[27/46] Remove duplicated stmt_vec_info lookups
commit1c2fef9a1cc6f1b21cb89a3621a9c2cb5cbf9e1a
authorrsandifo <rsandifo@138bc75d-0d04-0410-961f-82ee72b054a4>
Tue, 31 Jul 2018 14:24:02 +0000 (31 14:24 +0000)
committerrsandifo <rsandifo@138bc75d-0d04-0410-961f-82ee72b054a4>
Tue, 31 Jul 2018 14:24:02 +0000 (31 14:24 +0000)
tree3b452bba62175cb7ca1c21add51e201f53792dd3
parent5b4b7bcc8b2d1ff45a8815198cf334f60f992a0b
[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.

git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/trunk@263142 138bc75d-0d04-0410-961f-82ee72b054a4
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