add ctor/dtor to slp_tree
authorRichard Biener <rguenther@suse.de>
Wed, 20 May 2020 13:14:47 +0000 (15:14 +0200)
committerRichard Biener <rguenther@suse.de>
Fri, 22 May 2020 06:51:24 +0000 (08:51 +0200)
commitf8fb2ea2b17d38518a9ef9c8774bf4adc726e508
tree8719d1731f942f90809c2834efd508abc4960ac4
parentdc7aee01cd59aeebe3b0a944d97a8f0d05d9d645
add ctor/dtor to slp_tree

This adds constructor and destructor to slp_tree factoring common
code.  I've not changed the wrappers to overloaded CTORs since
I hope to use object_allocator<> and am not sure whether that can
be done in any fancy way yet.

2020-05-22  Richard Biener  <rguenther@suse.de>

* tree-vectorizer.h (_slp_tree::_slp_tree): New.
(_slp_tree::~_slp_tree): Likewise.
* tree-vect-slp.c (_slp_tree::_slp_tree): Factor out code
from allocators.
(_slp_tree::~_slp_tree): Implement.
(vect_free_slp_tree): Simplify.
(vect_create_new_slp_node): Likewise.  Add nops parameter.
(vect_build_slp_tree_2): Adjust.
(vect_analyze_slp_instance): Likewise.
gcc/ChangeLog
gcc/tree-vect-slp.c
gcc/tree-vectorizer.h