static bool vectorizable_slp_permutation (vec_info *, gimple_stmt_iterator *,
slp_tree, stmt_vector_for_cost *);
+object_allocator<_slp_tree> *slp_tree_pool;
+
+void *
+_slp_tree::operator new (size_t n)
+{
+ gcc_assert (n == sizeof (_slp_tree));
+ return slp_tree_pool->allocate_raw ();
+}
+
+void
+_slp_tree::operator delete (void *node, size_t n)
+{
+ gcc_assert (n == sizeof (_slp_tree));
+ slp_tree_pool->remove_raw (node);
+}
+
+
/* Initialize a SLP node. */
_slp_tree::_slp_tree ()
if (vect_loops_num <= 1)
return 0;
+ slp_tree_pool = new object_allocator<_slp_tree> ("SLP nodes for vect");
+
if (cfun->has_simduid_loops)
note_simd_array_uses (&simd_array_to_simduid_htab);
shrink_simd_arrays (simd_array_to_simduid_htab, simduid_to_vf_htab);
delete simduid_to_vf_htab;
cfun->has_simduid_loops = false;
+ delete slp_tree_pool;
+ slp_tree_pool = NULL;
if (num_vectorized_loops > 0)
{
}
}
+ slp_tree_pool = new object_allocator<_slp_tree> ("SLP nodes for slp");
+
vect_slp_function (fun);
+ delete slp_tree_pool;
+ slp_tree_pool = NULL;
+
if (!in_loop_pipeline)
{
scev_finalize ();
#include "tree-data-ref.h"
#include "tree-hash-traits.h"
#include "target.h"
+#include "alloc-pool.h"
/* Used for naming of new temporaries. */
************************************************************************/
typedef struct _slp_tree *slp_tree;
+extern object_allocator<_slp_tree> *slp_tree_pool;
+
/* A computation tree of an SLP instance. Each node corresponds to a group of
stmts to be packed in a SIMD stmt. */
struct _slp_tree {
enum tree_code code;
int vertex;
+
+ /* Allocate from slp_tree_pool. */
+ static void *operator new (size_t);
+
+ /* Return memory to slp_tree_pool. */
+ static void operator delete (void *, size_t);
};