Clean up interface to vector pattern recognisers

Programming / Compilers / GCC - rsandifo [138bc75d-0d04-0410-961f-82ee72b054a4] - 3 July 2018 10:04 EDT

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

- 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 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.

7987f646fe2 Clean up interface to vector pattern recognisers
gcc/ChangeLog | 21 +++++
gcc/tree-vect-patterns.c | 208 ++++++++++++++---------------------------------
2 files changed, 81 insertions(+), 148 deletions(-)


  • Share