Clean up interface to vector pattern recognisers
commit7987f646fe2c6fd0a733ea5d1023b2e047d8cc39
authorrsandifo <rsandifo@138bc75d-0d04-0410-961f-82ee72b054a4>
Tue, 3 Jul 2018 10:04:09 +0000 (3 10:04 +0000)
committerrsandifo <rsandifo@138bc75d-0d04-0410-961f-82ee72b054a4>
Tue, 3 Jul 2018 10:04:09 +0000 (3 10:04 +0000)
tree61d29f7ab17df598c102d18b2b96179fea95da5f
parent3f8879277725bf2b4208904012052f09f9262c64
Clean up interface to vector pattern recognisers

The PR85694 series removed the only cases in which a pattern recogniser
could attach patterns to more than one statement.  I think it would be
better to avoid adding any new instances of that, since it interferes
with the normal matching order.

This patch therefore switches the interface back to passing a single
statement instead of a vector.  It also gets rid of the clearing of
STMT_VINFO_RELATED_STMT on failure, since no recognisers use it now.

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

gcc/
* tree-vect-patterns.c (vect_recog_dot_prod_pattern):
(vect_recog_sad_pattern, vect_recog_widen_op_pattern)
(vect_recog_widen_mult_pattern, vect_recog_pow_pattern):
(vect_recog_widen_sum_pattern, vect_recog_over_widening_pattern)
(vect_recog_average_pattern, vect_recog_cast_forwprop_pattern)
(vect_recog_widen_shift_pattern, vect_recog_rotate_pattern)
(vect_recog_vector_vector_shift_pattern, vect_synth_mult_by_constant)
(vect_recog_mult_pattern, vect_recog_divmod_pattern)
(vect_recog_mixed_size_cond_pattern, vect_recog_bool_pattern)
(vect_recog_mask_conversion_pattern): Replace vec<gimple *>
parameter with a single stmt_vec_info.
(vect_recog_func_ptr): Likewise.
(vect_recog_gather_scatter_pattern): Likewise, folding in...
(vect_try_gather_scatter_pattern): ...this.
(vect_pattern_recog_1): Remove stmts_to_replace and just pass
the stmt_vec_info of the statement to be matched.  Don't clear
STMT_VINFO_RELATED_STMT.
(vect_pattern_recog): Update call accordingly.

git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/trunk@262336 138bc75d-0d04-0410-961f-82ee72b054a4
gcc/ChangeLog
gcc/tree-vect-patterns.c