aboutsummaryrefslogtreecommitdiff
path: root/gcc/reload1.c
diff options
context:
space:
mode:
authorKaveh R. Ghazi <ghazi@caip.rutgers.edu>1999-09-07 02:36:41 +0000
committerKaveh Ghazi <ghazi@gcc.gnu.org>1999-09-07 02:36:41 +0000
commitad85216ece38be37dacbbb3fa7bb7db69aa33a4b (patch)
tree4078f3a9721ec2407abe016bdfff56e653a05da4 /gcc/reload1.c
parentd821b3ac44bd8fe0339c7293046c422109d1910c (diff)
downloadgcc-ad85216ece38be37dacbbb3fa7bb7db69aa33a4b.zip
gcc-ad85216ece38be37dacbbb3fa7bb7db69aa33a4b.tar.gz
gcc-ad85216ece38be37dacbbb3fa7bb7db69aa33a4b.tar.bz2
c-aux-info.c (concat): Don't define.
* c-aux-info.c (concat): Don't define. * cccp.c (my_strerror): Likewise. All callers changed to use xstrerror instead. (do_include): Call xstrdup, not xmalloc/strcpy. (grow_outbuf): Don't check if xrealloc returns NULL, it can't. (xmalloc, xrealloc, xcalloc, xstrdup): Don't define. * collect2.c (my_strsignal): Likewise. All callers changed to use strsignal instead. (locatelib): Call xstrdup, not xmalloc/strcpy. * 1750a.h (ASM_OUTPUT_INTERNAL_LABEL): Call xmalloc, not malloc. * dsp16xx.c (override_options): Call xstrdup, not xmalloc/strcpy. * i370.h (ASM_DECLARE_FUNCTION_NAME): Call xmalloc, not malloc. * mips.c (build_mips16_call_stub): Call xstrdup, not xmalloc/strcpy. * cppinit.c (cpp_options_init): Call xcalloc, not xmalloc/bzero. * dwarfout.c (dwarfout_init): Call concat, not xmalloc/strcpy/... * except.c (new_eh_region_entry): Call xmalloc/xrealloc, not malloc/realloc. (find_all_handler_type_matches): Likewise. Don't check return value. (get_new_handler, init_insn_eh_region, process_nestinfo): Call xmalloc, not malloc. (init_eh_nesting_info): Likewise. Call xcalloc, not xmalloc/bzero. * gcc.c (xstrerror, xmalloc, xrealloc): Don't define. (init_spec): Call xcalloc, not xmalloc/bzero. (set_spec): Call xstrdup, not save_string. (record_temp_file): Call xstrdup, not xmalloc/strcpy. (find_a_file): Call xstrdup, not xmalloc/strcpy. (process_command): Call xstrdup, not save_string. (main): Call xcalloc, not xmalloc/bzero. * gcov.c (xmalloc): Don't define. (create_program_flow_graph): Call xcalloc, not xmalloc/bzero. (scan_for_source_files): Call xstrdup, not xmalloc/strcpy. (output_data): Call xcalloc, not xmalloc/bzero. * haifa-sched.c (schedule_insns): Call xcalloc, not xmalloc/bzero. * mips-tdump.c (xmalloc): Don't define. (print_symbol): Call xmalloc, not malloc. (read_tfile): Call xcalloc, not calloc. * mips-tfile.c (xfree, my_strsignal, xmalloc, xcalloc, xrealloc): Don't define. All callers of xfree/my_strsignal changed to use free/strsignal instead. (allocate_cluster): Call xcalloc, not calloc. * objc/objc-act.c (lang_init): Call concat, not xmalloc/strcpy/... Fix memory leak, free allocated memory. * prefix.c (translate_name): Call xstrdup, not save_string. (update_path): Likewise. * profile.c (branch_prob): Call xstrdup, not xmalloc/strcpy. * protoize.c (xstrerror, xmalloc, xrealloc, xfree, savestring2): Don't define. Callers of xfree/savestring2 changed to use free/concat instead. * reload1.c (reload): Call xcalloc, not xmalloc/bzero. (init_elim_table): Likewise. * resource.c (init_resource_info): Likewise. * stupid.c (stupid_life_analysis): Likewise. * toplev.c (xmalloc, xcalloc, xrealloc, xstrdup): Don't define. (open_dump_file): Call concat, not xmalloc/strcpy/... (clean_dump_file): Likewise. (compile_file): Call xstrdup, not xmalloc/strcpy. From-SVN: r29148
Diffstat (limited to 'gcc/reload1.c')
-rw-r--r--gcc/reload1.c31
1 files changed, 10 insertions, 21 deletions
diff --git a/gcc/reload1.c b/gcc/reload1.c
index 2a107e8..a03e810 100644
--- a/gcc/reload1.c
+++ b/gcc/reload1.c
@@ -655,27 +655,20 @@ reload (first, global, dumpfile)
Record memory equivalents in reg_mem_equiv so they can
be substituted eventually by altering the REG-rtx's. */
- reg_equiv_constant = (rtx *) xmalloc (max_regno * sizeof (rtx));
- bzero ((char *) reg_equiv_constant, max_regno * sizeof (rtx));
- reg_equiv_memory_loc = (rtx *) xmalloc (max_regno * sizeof (rtx));
- bzero ((char *) reg_equiv_memory_loc, max_regno * sizeof (rtx));
- reg_equiv_mem = (rtx *) xmalloc (max_regno * sizeof (rtx));
- bzero ((char *) reg_equiv_mem, max_regno * sizeof (rtx));
- reg_equiv_init = (rtx *) xmalloc (max_regno * sizeof (rtx));
- bzero ((char *) reg_equiv_init, max_regno * sizeof (rtx));
- reg_equiv_address = (rtx *) xmalloc (max_regno * sizeof (rtx));
- bzero ((char *) reg_equiv_address, max_regno * sizeof (rtx));
- reg_max_ref_width = (int *) xmalloc (max_regno * sizeof (int));
- bzero ((char *) reg_max_ref_width, max_regno * sizeof (int));
- reg_old_renumber = (short *) xmalloc (max_regno * sizeof (short));
+ reg_equiv_constant = (rtx *) xcalloc (max_regno, sizeof (rtx));
+ reg_equiv_memory_loc = (rtx *) xcalloc (max_regno, sizeof (rtx));
+ reg_equiv_mem = (rtx *) xcalloc (max_regno, sizeof (rtx));
+ reg_equiv_init = (rtx *) xcalloc (max_regno, sizeof (rtx));
+ reg_equiv_address = (rtx *) xcalloc (max_regno, sizeof (rtx));
+ reg_max_ref_width = (int *) xcalloc (max_regno, sizeof (int));
+ reg_old_renumber = (short *) xcalloc (max_regno, sizeof (short));
bcopy ((PTR) reg_renumber, (PTR) reg_old_renumber, max_regno * sizeof (short));
pseudo_forbidden_regs
= (HARD_REG_SET *) xmalloc (max_regno * sizeof (HARD_REG_SET));
pseudo_previous_regs
- = (HARD_REG_SET *) xmalloc (max_regno * sizeof (HARD_REG_SET));
+ = (HARD_REG_SET *) xcalloc (max_regno, sizeof (HARD_REG_SET));
CLEAR_HARD_REG_SET (bad_spill_regs_global);
- bzero ((char *) pseudo_previous_regs, max_regno * sizeof (HARD_REG_SET));
/* Look for REG_EQUIV notes; record what each pseudo is equivalent to.
Also find all paradoxical subregs and find largest such for each pseudo.
@@ -3731,12 +3724,8 @@ init_elim_table ()
#endif
if (!reg_eliminate)
- {
- reg_eliminate = (struct elim_table *)
- xmalloc(sizeof(struct elim_table) * NUM_ELIMINABLE_REGS);
- bzero ((PTR) reg_eliminate,
- sizeof(struct elim_table) * NUM_ELIMINABLE_REGS);
- }
+ reg_eliminate = (struct elim_table *)
+ xcalloc(sizeof(struct elim_table), NUM_ELIMINABLE_REGS);
/* Does this function require a frame pointer? */