[7/n] PR85694: Add a vect_pattern_detected helper
This message is a long write-up for a patch that simply adds a common routine for printing the "vector_foo_pattern: detected:" messages. The reason for doing this is that some routines check for target support themselves and some leave it to vect_pattern_recog_1. Those that leave it to vect_pattern_recog_1 currently print these "detected:" messages if the statements have the right form, even if the pattern is eventually discarded. IMO that's useful, and a lot of existing scan tests rely on it. However, a later patch makes patterns do their own testing, and stops them creating pattern statements until the tests have passed. This means (a) they need to print the "detected:" message earlier and (b) the pattern statement won't be around to print. The patch therefore makes all routines print the original statement rather than the pattern one. That information isn't obvious otherwise, whereas vect_pattern_recog_1 already prints the pattern statement in the case of a successful match. This also avoids the previous situation in which a routine could print "detected:" and then silently bail out before saying what had been detected. 2018-06-20 Richard Sandiford <richard.sandiford@arm.com> gcc/ * tree-vect-patterns.c (vect_pattern_detected): New function. (vect_recog_dot_prod_patternm, vect_recog_sad_pattern) (vect_recog_widen_mult_pattern, vect_recog_widen_sum_pattern) (vect_recog_over_widening_pattern, vect_recog_widen_shift_pattern (vect_recog_rotate_pattern, vect_recog_vector_vector_shift_pattern) (vect_recog_mult_pattern, vect_recog_divmod_pattern) (vect_recog_mixed_size_cond_pattern, vect_recog_bool_pattern) (vect_recog_mask_conversion_pattern) (vect_try_gather_scatter_pattern): Likewise. From-SVN: r261790
Showing
This diff is collapsed.
Click to expand it.
Please
register
or
sign in
to comment