slp: Add complex operations class to share first match among all matchers
authorTamar Christina <tamar.christina@arm.com>
Thu, 14 Jan 2021 21:00:10 +0000 (21:00 +0000)
committerTamar Christina <tamar.christina@arm.com>
Thu, 14 Jan 2021 21:00:10 +0000 (21:00 +0000)
commitb50df1e749bb06080ef727504dd7c2616f455f46
tree39853807b8fb480a63e5e0c6a783a6ee11d0b5d7
parent478e571a3eedfab198e48e8d2c8f02e491ba2c28
slp: Add complex operations class to share first match among all matchers

This introduces a common class complex_operations_pattern which encapsulates
the complex add, mul, fma and fms pattern in such a way so that the first match
is shared.

gcc/ChangeLog:

* tree-vect-slp-patterns.c (class complex_operations_pattern,
complex_operations_pattern::matches,
complex_operations_pattern::recognize,
complex_operations_pattern::build): New.
(slp_patterns): Use it.
gcc/tree-vect-slp-patterns.c