aboutsummaryrefslogtreecommitdiff
path: root/gcc/config/sh/sh.c
diff options
context:
space:
mode:
Diffstat (limited to 'gcc/config/sh/sh.c')
-rw-r--r--gcc/config/sh/sh.c24
1 files changed, 4 insertions, 20 deletions
diff --git a/gcc/config/sh/sh.c b/gcc/config/sh/sh.c
index 19600bc..fe4cf4d 100644
--- a/gcc/config/sh/sh.c
+++ b/gcc/config/sh/sh.c
@@ -4652,25 +4652,9 @@ typedef struct label_ref_list_d
{
rtx_code_label *label;
struct label_ref_list_d *next;
-
- /* Pool allocation new operator. */
- inline void *operator new (size_t)
- {
- return pool.allocate ();
- }
-
- /* Delete operator utilizing pool allocation. */
- inline void operator delete (void *ptr)
- {
- pool.remove ((label_ref_list_d *) ptr);
- }
-
- /* Memory allocation pool. */
- static pool_allocator<label_ref_list_d> pool;
-
} *label_ref_list_t;
-pool_allocator<label_ref_list_d> label_ref_list_d::pool
+static object_allocator<label_ref_list_d> label_ref_list_d_pool
("label references list", 30);
/* The SH cannot load a large constant into a register, constants have to
@@ -4792,7 +4776,7 @@ add_constant (rtx x, machine_mode mode, rtx last_value)
}
if (lab && pool_window_label)
{
- newref = new label_ref_list_d;
+ newref = label_ref_list_d_pool.allocate ();
newref->label = pool_window_label;
ref = pool_vector[pool_window_last].wend;
newref->next = ref;
@@ -4821,7 +4805,7 @@ add_constant (rtx x, machine_mode mode, rtx last_value)
pool_vector[pool_size].part_of_sequence_p = (lab == 0);
if (lab && pool_window_label)
{
- newref = new label_ref_list_d;
+ newref = label_ref_list_d_pool.allocate ();
newref->label = pool_window_label;
ref = pool_vector[pool_window_last].wend;
newref->next = ref;
@@ -6567,7 +6551,7 @@ sh_reorg (void)
insn = barrier;
}
}
- label_ref_list_d::pool.release ();
+ label_ref_list_d_pool.release ();
for (insn = first; insn; insn = NEXT_INSN (insn))
PUT_MODE (insn, VOIDmode);