summaryrefslogtreecommitdiff
path: root/gcc/config
diff options
context:
space:
mode:
Diffstat (limited to 'gcc/config')
-rw-r--r--gcc/config/alpha/alpha.c9
-rw-r--r--gcc/config/arm/arm.c2
-rw-r--r--gcc/config/avr/avr.c3
-rw-r--r--gcc/config/bfin/bfin.c6
-rw-r--r--gcc/config/cris/cris.c2
-rw-r--r--gcc/config/darwin.c2
-rw-r--r--gcc/config/frv/frv.c2
-rw-r--r--gcc/config/i386/i386.c7
-rw-r--r--gcc/config/i386/winnt.c4
-rw-r--r--gcc/config/ia64/ia64.c2
-rw-r--r--gcc/config/iq2000/iq2000.c6
-rw-r--r--gcc/config/m32c/m32c.c6
-rw-r--r--gcc/config/mep/mep.c8
-rw-r--r--gcc/config/mips/mips.c7
-rw-r--r--gcc/config/mmix/mmix.c2
-rw-r--r--gcc/config/moxie/moxie.c2
-rw-r--r--gcc/config/pa/pa.c12
-rw-r--r--gcc/config/rs6000/rs6000.c6
-rw-r--r--gcc/config/s390/s390.c2
-rw-r--r--gcc/config/score/score3.c2
-rw-r--r--gcc/config/score/score7.c2
-rw-r--r--gcc/config/sparc/sparc.c2
-rw-r--r--gcc/config/xtensa/xtensa.c2
23 files changed, 38 insertions, 60 deletions
diff --git a/gcc/config/alpha/alpha.c b/gcc/config/alpha/alpha.c
index 4daf3df4d65..0246d5a5b6d 100644
--- a/gcc/config/alpha/alpha.c
+++ b/gcc/config/alpha/alpha.c
@@ -4806,8 +4806,7 @@ struct GTY(()) machine_function
static struct machine_function *
alpha_init_machine_status (void)
{
- return ((struct machine_function *)
- ggc_alloc_cleared (sizeof (struct machine_function)));
+ return ggc_alloc_cleared_machine_function ();
}
/* Support for frame based VMS condition handlers. */
@@ -9904,7 +9903,7 @@ alpha_need_linkage (const char *name, int is_local)
alpha_funcs_tree = splay_tree_new_ggc ((splay_tree_compare_fn)
splay_tree_compare_pointers);
- cfaf = (struct alpha_funcs *) ggc_alloc (sizeof (struct alpha_funcs));
+ cfaf = ggc_alloc_alpha_funcs ();
cfaf->links = 0;
cfaf->num = ++alpha_funcs_num;
@@ -9940,7 +9939,7 @@ alpha_need_linkage (const char *name, int is_local)
else
alpha_links_tree = splay_tree_new_ggc ((splay_tree_compare_fn) strcmp);
- al = (struct alpha_links *) ggc_alloc (sizeof (struct alpha_links));
+ al = ggc_alloc_alpha_links ();
name = ggc_strdup (name);
/* Assume external if no definition. */
@@ -10012,7 +10011,7 @@ alpha_use_linkage (rtx func, tree cfundecl, int lflag, int rflag)
name_len = strlen (name);
linksym = (char *) alloca (name_len + 50);
- al = (struct alpha_links *) ggc_alloc (sizeof (struct alpha_links));
+ al = ggc_alloc_alpha_links ();
al->num = cfaf->num;
node = splay_tree_lookup (alpha_links_tree, (splay_tree_key) name);
diff --git a/gcc/config/arm/arm.c b/gcc/config/arm/arm.c
index 31c13543e90..e44e94946fb 100644
--- a/gcc/config/arm/arm.c
+++ b/gcc/config/arm/arm.c
@@ -19280,7 +19280,7 @@ static struct machine_function *
arm_init_machine_status (void)
{
struct machine_function *machine;
- machine = (machine_function *) ggc_alloc_cleared (sizeof (machine_function));
+ machine = ggc_alloc_cleared_machine_function ();
#if ARM_FT_UNKNOWN != 0
machine->func_type = ARM_FT_UNKNOWN;
diff --git a/gcc/config/avr/avr.c b/gcc/config/avr/avr.c
index d8942c5c081..531a4128bf3 100644
--- a/gcc/config/avr/avr.c
+++ b/gcc/config/avr/avr.c
@@ -243,8 +243,7 @@ static const enum reg_class reg_class_tab[]={
static struct machine_function *
avr_init_machine_status (void)
{
- return ((struct machine_function *)
- ggc_alloc_cleared (sizeof (struct machine_function)));
+ return ggc_alloc_cleared_machine_function ();
}
/* Return register class for register R. */
diff --git a/gcc/config/bfin/bfin.c b/gcc/config/bfin/bfin.c
index 152e910ee67..c187bf3bbc7 100644
--- a/gcc/config/bfin/bfin.c
+++ b/gcc/config/bfin/bfin.c
@@ -2634,11 +2634,7 @@ bfin_handle_option (size_t code, const char *arg, int value)
static struct machine_function *
bfin_init_machine_status (void)
{
- struct machine_function *f;
-
- f = GGC_CNEW (struct machine_function);
-
- return f;
+ return ggc_alloc_cleared_machine_function ();
}
/* Implement the macro OVERRIDE_OPTIONS. */
diff --git a/gcc/config/cris/cris.c b/gcc/config/cris/cris.c
index 62ee7d0c330..9d38d0fee47 100644
--- a/gcc/config/cris/cris.c
+++ b/gcc/config/cris/cris.c
@@ -2583,7 +2583,7 @@ cris_init_expanders (void)
static struct machine_function *
cris_init_machine_status (void)
{
- return GGC_CNEW (struct machine_function);
+ return ggc_alloc_cleared_machine_function ();
}
/* Split a 2 word move (DI or presumably DF) into component parts.
diff --git a/gcc/config/darwin.c b/gcc/config/darwin.c
index 9a9dde160c5..7eedd95eab3 100644
--- a/gcc/config/darwin.c
+++ b/gcc/config/darwin.c
@@ -429,7 +429,7 @@ machopic_indirection_name (rtx sym_ref, bool stub_p)
}
else
{
- p = (machopic_indirection *) ggc_alloc (sizeof (machopic_indirection));
+ p = ggc_alloc_machopic_indirection ();
p->symbol = sym_ref;
p->ptr_name = xstrdup (buffer);
p->stub_p = stub_p;
diff --git a/gcc/config/frv/frv.c b/gcc/config/frv/frv.c
index d4009693cd8..e72dd2af1f9 100644
--- a/gcc/config/frv/frv.c
+++ b/gcc/config/frv/frv.c
@@ -7054,7 +7054,7 @@ frv_assemble_integer (rtx value, unsigned int size, int aligned_p)
static struct machine_function *
frv_init_machine_status (void)
{
- return GGC_CNEW (struct machine_function);
+ return ggc_alloc_cleared_machine_function ();
}
/* Implement TARGET_SCHED_ISSUE_RATE. */
diff --git a/gcc/config/i386/i386.c b/gcc/config/i386/i386.c
index df18fdbd7eb..1bdc6891df3 100644
--- a/gcc/config/i386/i386.c
+++ b/gcc/config/i386/i386.c
@@ -10641,7 +10641,7 @@ get_dllimport_decl (tree decl)
if (h)
return h->to;
- *loc = h = GGC_NEW (struct tree_map);
+ *loc = h = ggc_alloc_tree_map ();
h->hash = in.hash;
h->base.from = decl;
h->to = to = build_decl (DECL_SOURCE_LOCATION (decl),
@@ -19504,7 +19504,7 @@ ix86_init_machine_status (void)
{
struct machine_function *f;
- f = GGC_CNEW (struct machine_function);
+ f = ggc_alloc_cleared_machine_function ();
f->use_fast_prologue_epilogue_nregs = -1;
f->tls_descriptor_call_expanded_p = 0;
f->call_abi = ix86_abi;
@@ -19532,8 +19532,7 @@ assign_386_stack_local (enum machine_mode mode, enum ix86_stack_slot n)
if (s->mode == mode && s->n == n)
return copy_rtx (s->rtl);
- s = (struct stack_local_entry *)
- ggc_alloc (sizeof (struct stack_local_entry));
+ s = ggc_alloc_stack_local_entry ();
s->n = n;
s->mode = mode;
s->rtl = assign_stack_local (mode, GET_MODE_SIZE (mode), 0);
diff --git a/gcc/config/i386/winnt.c b/gcc/config/i386/winnt.c
index 3750e0c4b08..c20a2ae89fc 100644
--- a/gcc/config/i386/winnt.c
+++ b/gcc/config/i386/winnt.c
@@ -576,7 +576,7 @@ i386_pe_record_external_function (tree decl, const char *name)
{
struct extern_list *p;
- p = (struct extern_list *) ggc_alloc (sizeof *p);
+ p = ggc_alloc_extern_list ();
p->next = extern_head;
p->decl = decl;
p->name = name;
@@ -617,7 +617,7 @@ i386_pe_maybe_record_exported_symbol (tree decl, const char *name, int is_data)
gcc_assert (TREE_PUBLIC (decl));
- p = (struct export_list *) ggc_alloc (sizeof *p);
+ p = ggc_alloc_export_list ();
p->next = export_head;
p->name = name;
p->is_data = is_data;
diff --git a/gcc/config/ia64/ia64.c b/gcc/config/ia64/ia64.c
index e1e3dff8b59..a568ee4f849 100644
--- a/gcc/config/ia64/ia64.c
+++ b/gcc/config/ia64/ia64.c
@@ -5540,7 +5540,7 @@ void ia64_init_expanders (void)
static struct machine_function *
ia64_init_machine_status (void)
{
- return GGC_CNEW (struct machine_function);
+ return ggc_alloc_cleared_machine_function ();
}
static enum attr_itanium_class ia64_safe_itanium_class (rtx);
diff --git a/gcc/config/iq2000/iq2000.c b/gcc/config/iq2000/iq2000.c
index 0e51eca7965..fc8c4e56789 100644
--- a/gcc/config/iq2000/iq2000.c
+++ b/gcc/config/iq2000/iq2000.c
@@ -1385,11 +1385,7 @@ iq2000_va_start (tree valist, rtx nextarg)
static struct machine_function *
iq2000_init_machine_status (void)
{
- struct machine_function *f;
-
- f = GGC_CNEW (struct machine_function);
-
- return f;
+ return ggc_alloc_cleared_machine_function ();
}
/* Implement TARGET_HANDLE_OPTION. */
diff --git a/gcc/config/m32c/m32c.c b/gcc/config/m32c/m32c.c
index cfc4a1593b6..3280d14e78e 100644
--- a/gcc/config/m32c/m32c.c
+++ b/gcc/config/m32c/m32c.c
@@ -435,11 +435,7 @@ m32c_override_options (void)
static struct machine_function *
m32c_init_machine_status (void)
{
- struct machine_function *machine;
- machine =
- (machine_function *) ggc_alloc_cleared (sizeof (machine_function));
-
- return machine;
+ return ggc_alloc_cleared_machine_function ();
}
/* Implements INIT_EXPANDERS. We just set up to call the above
diff --git a/gcc/config/mep/mep.c b/gcc/config/mep/mep.c
index a4b167da4b7..4d5e68218e8 100644
--- a/gcc/config/mep/mep.c
+++ b/gcc/config/mep/mep.c
@@ -2369,11 +2369,7 @@ mep_register_move_cost (enum machine_mode mode, enum reg_class from, enum reg_cl
static struct machine_function *
mep_init_machine_status (void)
{
- struct machine_function *f;
-
- f = (struct machine_function *) ggc_alloc_cleared (sizeof (struct machine_function));
-
- return f;
+ return ggc_alloc_cleared_machine_function ();
}
static rtx
@@ -4234,7 +4230,7 @@ mep_note_pragma_flag (const char *funcname, int flag)
if (!*slot)
{
- *slot = GGC_NEW (pragma_entry);
+ *slot = ggc_alloc_pragma_entry ();
(*slot)->flag = 0;
(*slot)->used = 0;
(*slot)->funcname = ggc_strdup (funcname);
diff --git a/gcc/config/mips/mips.c b/gcc/config/mips/mips.c
index 33f6047e166..a699238ba1c 100644
--- a/gcc/config/mips/mips.c
+++ b/gcc/config/mips/mips.c
@@ -1217,7 +1217,7 @@ mflip_mips16_use_mips16_p (tree decl)
if (!entry)
{
mips16_flipper = !mips16_flipper;
- entry = GGC_NEW (struct mflip_mips16_entry);
+ entry = ggc_alloc_mflip_mips16_entry ();
entry->name = name;
entry->mips16_p = mips16_flipper ? !mips_base_mips16 : mips_base_mips16;
*slot = entry;
@@ -5851,7 +5851,7 @@ mips16_local_alias (rtx func)
SYMBOL_REF_FLAGS (local) = SYMBOL_REF_FLAGS (func) | SYMBOL_FLAG_LOCAL;
/* Create a new structure to represent the mapping. */
- alias = GGC_NEW (struct mips16_local_alias);
+ alias = ggc_alloc_mips16_local_alias ();
alias->func = func;
alias->local = local;
*slot = alias;
@@ -15221,8 +15221,7 @@ mips_set_current_function (tree fndecl)
static struct machine_function *
mips_init_machine_status (void)
{
- return ((struct machine_function *)
- ggc_alloc_cleared (sizeof (struct machine_function)));
+ return ggc_alloc_cleared_machine_function ();
}
/* Return the processor associated with the given ISA level, or null
diff --git a/gcc/config/mmix/mmix.c b/gcc/config/mmix/mmix.c
index de66ac4e40d..4b35e06df4f 100644
--- a/gcc/config/mmix/mmix.c
+++ b/gcc/config/mmix/mmix.c
@@ -263,7 +263,7 @@ mmix_init_expanders (void)
static struct machine_function *
mmix_init_machine_status (void)
{
- return GGC_CNEW (struct machine_function);
+ return ggc_alloc_cleared_machine_function ();
}
/* DATA_ALIGNMENT.
diff --git a/gcc/config/moxie/moxie.c b/gcc/config/moxie/moxie.c
index 1e692b18d7e..b87b80f4744 100644
--- a/gcc/config/moxie/moxie.c
+++ b/gcc/config/moxie/moxie.c
@@ -205,7 +205,7 @@ struct GTY(()) machine_function
static struct machine_function *
moxie_init_machine_status (void)
{
- return GGC_CNEW (struct machine_function);
+ return ggc_alloc_cleared_machine_function ();
}
diff --git a/gcc/config/pa/pa.c b/gcc/config/pa/pa.c
index 5ef405b4f44..024053e413f 100644
--- a/gcc/config/pa/pa.c
+++ b/gcc/config/pa/pa.c
@@ -558,7 +558,7 @@ pa_init_builtins (void)
static struct machine_function *
pa_init_machine_status (void)
{
- return GGC_CNEW (machine_function);
+ return ggc_alloc_cleared_machine_function ();
}
/* If FROM is a probable pointer register, mark TO as a probable
@@ -5375,13 +5375,11 @@ get_deferred_plabel (rtx symbol)
tree id;
if (deferred_plabels == 0)
- deferred_plabels = (struct deferred_plabel *)
- ggc_alloc (sizeof (struct deferred_plabel));
+ deferred_plabels = ggc_alloc_deferred_plabel ();
else
- deferred_plabels = (struct deferred_plabel *)
- ggc_realloc (deferred_plabels,
- ((n_deferred_plabels + 1)
- * sizeof (struct deferred_plabel)));
+ deferred_plabels = GGC_RESIZEVEC (struct deferred_plabel,
+ deferred_plabels,
+ n_deferred_plabels + 1);
i = n_deferred_plabels++;
deferred_plabels[i].internal_label = gen_label_rtx ();
diff --git a/gcc/config/rs6000/rs6000.c b/gcc/config/rs6000/rs6000.c
index 9e31a22e5f8..a4f847d99bd 100644
--- a/gcc/config/rs6000/rs6000.c
+++ b/gcc/config/rs6000/rs6000.c
@@ -12569,7 +12569,7 @@ builtin_function_type (enum machine_mode mode_ret, enum machine_mode mode_arg0,
found = htab_find_slot (builtin_hash_table, &h, INSERT);
if (*found == NULL)
{
- h2 = GGC_NEW (struct builtin_hash_struct);
+ h2 = ggc_alloc_builtin_hash_struct ();
*h2 = h;
*found = (void *)h2;
args = void_list_node;
@@ -14465,7 +14465,7 @@ rs6000_got_register (rtx value ATTRIBUTE_UNUSED)
static struct machine_function *
rs6000_init_machine_status (void)
{
- return GGC_CNEW (machine_function);
+ return ggc_alloc_cleared_machine_function ();
}
/* These macros test for integers and extract the low-order bits. */
@@ -21194,7 +21194,7 @@ output_toc (FILE *file, rtx x, int labelno, enum machine_mode mode)
toc_hash_table = htab_create_ggc (1021, toc_hash_function,
toc_hash_eq, NULL);
- h = GGC_NEW (struct toc_hash_struct);
+ h = ggc_alloc_toc_hash_struct ();
h->key = x;
h->key_mode = mode;
h->labelno = labelno;
diff --git a/gcc/config/s390/s390.c b/gcc/config/s390/s390.c
index fb6913f2d60..1b742357f26 100644
--- a/gcc/config/s390/s390.c
+++ b/gcc/config/s390/s390.c
@@ -1453,7 +1453,7 @@ s390_narrow_logical_operator (enum rtx_code code, rtx *memop, rtx *immop)
static struct machine_function *
s390_init_machine_status (void)
{
- return GGC_CNEW (struct machine_function);
+ return ggc_alloc_cleared_machine_function ();
}
/* Change optimizations to be performed, depending on the
diff --git a/gcc/config/score/score3.c b/gcc/config/score/score3.c
index 724cf61bc64..3e20f16dc33 100644
--- a/gcc/config/score/score3.c
+++ b/gcc/config/score/score3.c
@@ -1186,7 +1186,7 @@ score3_output_external (FILE *file ATTRIBUTE_UNUSED,
if (score3_in_small_data_p (decl))
{
- p = (struct extern_list *) ggc_alloc (sizeof (struct extern_list));
+ p = ggc_alloc_extern_list ();
p->next = extern_head;
p->name = name;
p->size = int_size_in_bytes (TREE_TYPE (decl));
diff --git a/gcc/config/score/score7.c b/gcc/config/score/score7.c
index 547ac00517a..464d97cee22 100644
--- a/gcc/config/score/score7.c
+++ b/gcc/config/score/score7.c
@@ -1174,7 +1174,7 @@ score7_output_external (FILE *file ATTRIBUTE_UNUSED,
if (score7_in_small_data_p (decl))
{
- p = (struct extern_list *) ggc_alloc (sizeof (struct extern_list));
+ p = ggc_alloc_extern_list ();
p->next = extern_head;
p->name = name;
p->size = int_size_in_bytes (TREE_TYPE (decl));
diff --git a/gcc/config/sparc/sparc.c b/gcc/config/sparc/sparc.c
index 9e33c740b01..8b44dbeb80d 100644
--- a/gcc/config/sparc/sparc.c
+++ b/gcc/config/sparc/sparc.c
@@ -9032,7 +9032,7 @@ sparc_can_output_mi_thunk (const_tree thunk_fndecl ATTRIBUTE_UNUSED,
static struct machine_function *
sparc_init_machine_status (void)
{
- return GGC_CNEW (struct machine_function);
+ return ggc_alloc_cleared_machine_function ();
}
/* Locate some local-dynamic symbol still in use by this function
diff --git a/gcc/config/xtensa/xtensa.c b/gcc/config/xtensa/xtensa.c
index 76e872dddb3..fe66711af39 100644
--- a/gcc/config/xtensa/xtensa.c
+++ b/gcc/config/xtensa/xtensa.c
@@ -1281,7 +1281,7 @@ xtensa_expand_nonlocal_goto (rtx *operands)
static struct machine_function *
xtensa_init_machine_status (void)
{
- return GGC_CNEW (struct machine_function);
+ return ggc_alloc_cleared_machine_function ();
}