]> git.ipfire.org Git - thirdparty/gcc.git/commit
vect: Small C++11-ification of vect_vect_recog_func_ptrs
authorAndrew Pinski <quic_apinski@quicinc.com>
Wed, 7 Aug 2024 17:58:45 +0000 (10:58 -0700)
committerAndrew Pinski <quic_apinski@quicinc.com>
Thu, 8 Aug 2024 13:53:37 +0000 (06:53 -0700)
commitad7d4843d452b97686bcc30da11b933759f09a12
tree6e8db414b49579d71ece6eecede2da971cf6e8ea
parentecdf7a4ed82bd95f8058914c9f92ad2c2f924033
vect: Small C++11-ification of vect_vect_recog_func_ptrs

This is a small C++11-ificiation for the use of vect_vect_recog_func_ptrs.
Changes the loop into a range based loop which then we can remove the variable
definition of NUM_PATTERNS. Also uses const reference instead of a pointer.

Bootstrapped and tested on x86_64-linux-gnu.

gcc/ChangeLog:

* tree-vect-patterns.cc (NUM_PATTERNS): Delete.
(vect_pattern_recog_1): Constify and change
recog_func to a reference.
(vect_pattern_recog): Use range-based loop over
vect_vect_recog_func_ptrs.

Signed-off-by: Andrew Pinski <quic_apinski@quicinc.com>
gcc/tree-vect-patterns.cc