+2015-06-01 Martin Liska <mliska@suse.cz>
+
+ * sel-sched-ir.c (alloc_sched_pools): Use new type-based pool allocator.
+ (free_sched_pools): Likewise.
+ * sel-sched-ir.h (_list_alloc): Likewise.
+ (_list_remove): Likewise.
+
2015-06-01 Martin Liska <mliska@suse.cz>
* stmt.c (add_case_node): Use new type-based pool allocator.
sel_region_bb_info = vNULL;
/* A pool for allocating all lists. */
-alloc_pool sched_lists_pool;
+pool_allocator<_list_node> sched_lists_pool ("sel-sched-lists", 500);
/* This contains information about successors for compute_av_set. */
struct succs_info current_succs;
succs_info_pool.size = succs_size;
succs_info_pool.top = -1;
succs_info_pool.max_top = -1;
-
- sched_lists_pool = create_alloc_pool ("sel-sched-lists",
- sizeof (struct _list_node), 500);
}
/* Free the pools. */
{
int i;
- free_alloc_pool (sched_lists_pool);
+ sched_lists_pool.release ();
gcc_assert (succs_info_pool.top == -1);
for (i = 0; i <= succs_info_pool.max_top; i++)
{
/* _list_t functions.
All of _*list_* functions are used through accessor macros, thus
we can't move them in sel-sched-ir.c. */
-extern alloc_pool sched_lists_pool;
+extern pool_allocator<_list_node> sched_lists_pool;
static inline _list_t
_list_alloc (void)
{
- return (_list_t) pool_alloc (sched_lists_pool);
+ return sched_lists_pool.allocate ();
}
static inline void
_list_t n = *lp;
*lp = _LIST_NEXT (n);
- pool_free (sched_lists_pool, n);
+ sched_lists_pool.remove (n);
}
static inline void