From 5ed6ace578e0657c0481bacd16c97ceb3deda9a4 Mon Sep 17 00:00:00 2001 From: Marcin Dalecki Date: Tue, 31 Jan 2006 20:56:55 +0100 Subject: tree-vrp.c: Use XNEW/XCNEW allocation wrappers. 2006-01-31 Marcin Dalecki * tree-vrp.c: Use XNEW/XCNEW allocation wrappers. * regrename.c: Ditto. * tree-ssa-loop-im.c: Ditto. * tree-dump.c: Ditto. * tree-complex.c: Ditto. * genrecog.c: Ditto. * tree-ssa-threadupdate.c: Ditto. * tracer.c: Ditto. * java/class.c: Ditto. * java/jcf-parse.c: Ditto. * java/resource.c: Ditto. * java/except.c: Ditto. * java/jvspec.c: Ditto. * java/jcf-write.c: Ditto. * java/jcf-path.c: Ditto. * java/gjavah.c: Ditto. * java/zextract.c: Ditto. * java/jcf-io.c: Ditto. * java/jcf.h: Ditto. * java/buffer.c: Ditto. * java/lang.c: Ditto. * java/parse-scan.y: Ditto. * java/lex.c: Ditto. * java/lex.h: Ditto. * cfgloopmanip.c: Ditto. * postreload-gcse.c: Ditto. * tree-ssa-loop-manip.c: Ditto. * postreload.c: Ditto. * tree-ssa-loop-ch.c: Ditto. * loop.c: Ditto. * ipa-cp.c: Ditto. * cppspec.c: Ditto. * diagnostic.c: Ditto. * final.c: Ditto. * genoutput.c: Ditto. * gcc.c: Ditto. * cfghooks.c: Ditto. * cfgloopanal.c: Ditto. * objc/objc-act.c: Ditto. * gcov.c: Ditto. * genextract.c: Ditto. * genautomata.c: Ditto. * pretty-print.c: Ditto. * genemit.c: Ditto. * cgraphunit.c: Ditto. * flow.c: Ditto. * df-scan.c: Ditto. * haifa-sched.c: Ditto. * dominance.c: Ditto. * dbxout.c: Ditto. * tree-ssa-loop-ivopts.c: Ditto. * df-core.c: Ditto. * mode-switching.c: Ditto. * modulo-sched.c: Ditto. * graph.c: Ditto. * ipa-pure-const.c: Ditto. * cse.c: Ditto. * fix-header.c: Ditto. * web.c: Ditto. * tree-stdarg.c: Ditto. * ipa-utils.c: Ditto. * loop-init.c: Ditto. * ipa-inline.c: Ditto. * cfganal.c: Ditto. * global.c: Ditto. * alloc-pool.c: Ditto. * dwarf2out.c: Ditto. * opts.c: Ditto. * genattrtab.c: Ditto. * tree-ssa-loop-ivcanon.c: Ditto. * predict.c: Ditto. * timevar.c: Ditto. * lcm.c: Ditto. * fortran/gfortranspec.c: Ditto. * regmove.c: Ditto. * local-alloc.c: Ditto. * langhooks.c: Ditto. * function.c: Ditto. * tree-vectorizer.c: Ditto. * gcse.c: Ditto. * ipa-type-escape.c: Ditto. * alias.c: Ditto. * tree-if-conv.c: Ditto. * profile.c: Ditto. * ipa.c: Ditto. * tree-data-ref.c: Ditto. * loop-unroll.c: Ditto. * treelang/treetree.c: Ditto. * calls.c: Ditto. * bt-load.c: Ditto. * ggc-common.c: Ditto. * except.c: Ditto. * coverage.c: Ditto. * cselib.c: Ditto. * tree-cfgcleanup.c: Ditto. * tree-ssa-pre.c: Ditto. * cfgcleanup.c: Ditto. * loop-invariant.c: Ditto. * loop-iv.c: Ditto. * ipa-prop.c: Ditto. * print-tree.c: Ditto. * conflict.c: Ditto. * ggc-page.c: Ditto. * sched-deps.c: Ditto. * regclass.c: Ditto. * tree-object-size.c: Ditto. * combine.c: Ditto. * bb-reorder.c: Ditto. * resource.c: Ditto. * var-tracking.c: Ditto. * cfgloop.c: Ditto. * df-problems.c: Ditto. * reg-stack.c: Ditto. * tlink.c: Ditto. * gccspec.c: Ditto. * sched-rgn.c: Ditto. * tree-ssa-structalias.c: Ditto. * tree-ssa-reassoc.c: Ditto. * config/darwin-c.c: Ditto. * config/darwin.c: Ditto. * config/arm/arm.c: Ditto. * cfgrtl.c: Ditto. * collect2.c: Ditto. * reload1.c: Ditto. From-SVN: r110446 --- gcc/gcse.c | 20 ++++++++++---------- 1 file changed, 10 insertions(+), 10 deletions(-) (limited to 'gcc/gcse.c') diff --git a/gcc/gcse.c b/gcc/gcse.c index 290f70e..74dd6ea 100644 --- a/gcc/gcse.c +++ b/gcc/gcse.c @@ -3405,7 +3405,7 @@ one_cprop_pass (int pass, bool cprop_jumps, bool bypass_jumps) local_cprop_pass (cprop_jumps); /* Determine implicit sets. */ - implicit_sets = xcalloc (last_basic_block, sizeof (rtx)); + implicit_sets = XCNEWVEC (rtx, last_basic_block); find_implicit_sets (); alloc_hash_table (max_cuid, &set_hash_table, 1); @@ -3936,7 +3936,7 @@ static int pre_expr_reaches_here_p (basic_block occr_bb, struct expr *expr, basic_block bb) { int rval; - char *visited = xcalloc (last_basic_block, 1); + char *visited = XCNEWVEC (char, last_basic_block); rval = pre_expr_reaches_here_p_work (occr_bb, expr, bb, visited); @@ -4499,7 +4499,7 @@ pre_gcse (void) /* Compute a mapping from expression number (`bitmap_index') to hash table entry. */ - index_map = xcalloc (expr_hash_table.n_elems, sizeof (struct expr *)); + index_map = XCNEWVEC (struct expr *, expr_hash_table.n_elems); for (i = 0; i < expr_hash_table.size; i++) for (expr = expr_hash_table.table[i]; expr != NULL; expr = expr->next_same_hash) index_map[expr->bitmap_index] = expr; @@ -4790,7 +4790,7 @@ hoist_expr_reaches_here_p (basic_block expr_bb, int expr_index, basic_block bb, if (visited == NULL) { visited_allocated_locally = 1; - visited = xcalloc (last_basic_block, 1); + visited = XCNEWVEC (char, last_basic_block); } FOR_EACH_EDGE (pred, ei, bb->preds) @@ -4842,7 +4842,7 @@ hoist_code (void) /* Compute a mapping from expression number (`bitmap_index') to hash table entry. */ - index_map = xcalloc (expr_hash_table.n_elems, sizeof (struct expr *)); + index_map = XCNEWVEC (struct expr *, expr_hash_table.n_elems); for (i = 0; i < expr_hash_table.size; i++) for (expr = expr_hash_table.table[i]; expr != NULL; expr = expr->next_same_hash) index_map[expr->bitmap_index] = expr; @@ -5071,7 +5071,7 @@ ldst_entry (rtx x) if (*slot) return (struct ls_expr *)*slot; - ptr = xmalloc (sizeof (struct ls_expr)); + ptr = XNEW (struct ls_expr); ptr->next = pre_ldst_mems; ptr->expr = NULL; @@ -5752,8 +5752,8 @@ compute_store_table (void) pre_ldst_mems = 0; pre_ldst_table = htab_create (13, pre_ldst_expr_hash, pre_ldst_expr_eq, NULL); - last_set_in = xcalloc (max_gcse_regno, sizeof (int)); - already_set = xmalloc (sizeof (int) * max_gcse_regno); + last_set_in = XCNEWVEC (int, max_gcse_regno); + already_set = XNEWVEC (int, max_gcse_regno); /* Find all the stores we care about. */ FOR_EACH_BB (bb) @@ -6094,7 +6094,7 @@ build_store_vectors (void) transp = sbitmap_vector_alloc (last_basic_block, num_stores); sbitmap_vector_zero (transp, last_basic_block); - regs_set_in_block = xmalloc (sizeof (int) * max_gcse_regno); + regs_set_in_block = XNEWVEC (int, max_gcse_regno); FOR_EACH_BB (bb) { @@ -6242,7 +6242,7 @@ remove_reachable_equiv_notes (basic_block bb, struct ls_expr *smexpr) rtx last, insn, note; rtx mem = smexpr->pattern; - stack = xmalloc (sizeof (edge_iterator) * n_basic_blocks); + stack = XNEWVEC (edge_iterator, n_basic_blocks); sp = 0; ei = ei_start (bb->succs); -- cgit v1.1