slp: upgrade complex add to new format and fix memory leaks
authorTamar Christina <tamar.christina@arm.com>
Mon, 11 Jan 2021 09:58:36 +0000 (09:58 +0000)
committerTamar Christina <tamar.christina@arm.com>
Mon, 11 Jan 2021 09:58:36 +0000 (09:58 +0000)
commit0c18faac3fb407d182dfa82426d1be7cce587926
tree375cf02137d003b016c61e86965888bd99ccdf54
parentbd4298e1927f6c519d5b7829023b1db7e64592e6
slp: upgrade complex add to new format and fix memory leaks

This fixes a memory leak in complex_add_pattern because I was not calling
vect_free_slp_tree when dissolving one side of the TWO_OPERANDS nodes.

Secondly it also upgrades the class to the new inteface required by the other
patterns.

gcc/ChangeLog:

* tree-vect-slp-patterns.c (class complex_pattern,
class complex_add_pattern): Add parameters to matches.
(complex_add_pattern::build): Free memory.
(complex_add_pattern::matches): Move validation end of match.
(complex_add_pattern::recognize): Likewise.
gcc/tree-vect-slp-patterns.c