diff options
author | Marcin Dalecki <martin@dalecki.de> | 2006-01-31 20:56:55 +0100 |
---|---|---|
committer | Marcin Dalecki <dalecki@gcc.gnu.org> | 2006-01-31 20:56:55 +0100 |
commit | 5ed6ace578e0657c0481bacd16c97ceb3deda9a4 (patch) | |
tree | 1d4ee70ba0860ea79946b28d772ea552777594d6 /gcc/tree-ssa-loop-ivopts.c | |
parent | 8f13c4d68fa3f5328f93cde8274152f8da5bd341 (diff) | |
download | gcc-5ed6ace578e0657c0481bacd16c97ceb3deda9a4.zip gcc-5ed6ace578e0657c0481bacd16c97ceb3deda9a4.tar.gz gcc-5ed6ace578e0657c0481bacd16c97ceb3deda9a4.tar.bz2 |
tree-vrp.c: Use XNEW/XCNEW allocation wrappers.
2006-01-31 Marcin Dalecki <martin@dalecki.de>
* 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
Diffstat (limited to 'gcc/tree-ssa-loop-ivopts.c')
-rw-r--r-- | gcc/tree-ssa-loop-ivopts.c | 30 |
1 files changed, 14 insertions, 16 deletions
diff --git a/gcc/tree-ssa-loop-ivopts.c b/gcc/tree-ssa-loop-ivopts.c index 8e1c53a..7e1363e 100644 --- a/gcc/tree-ssa-loop-ivopts.c +++ b/gcc/tree-ssa-loop-ivopts.c @@ -749,8 +749,7 @@ tree_ssa_iv_optimize_init (struct loops *loops, struct ivopts_data *data) unsigned i; data->version_info_size = 2 * num_ssa_names; - data->version_info = xcalloc (data->version_info_size, - sizeof (struct version_info)); + data->version_info = XCNEWVEC (struct version_info, data->version_info_size); data->relevant = BITMAP_ALLOC (NULL); data->important_candidates = BITMAP_ALLOC (NULL); data->max_inv_id = 0; @@ -825,7 +824,7 @@ determine_base_object (tree expr) static struct iv * alloc_iv (tree base, tree step) { - struct iv *iv = xcalloc (1, sizeof (struct iv)); + struct iv *iv = XCNEW (struct iv); if (step && integer_zerop (step)) step = NULL_TREE; @@ -1160,7 +1159,7 @@ static struct iv_use * record_use (struct ivopts_data *data, tree *use_p, struct iv *iv, tree stmt, enum use_type use_type) { - struct iv_use *use = xcalloc (1, sizeof (struct iv_use)); + struct iv_use *use = XCNEW (struct iv_use); use->id = n_iv_uses (data); use->type = use_type; @@ -1246,7 +1245,7 @@ find_interesting_uses_outer_or_nonlin (struct ivopts_data *data, tree op, } iv->have_use_for = true; - civ = xmalloc (sizeof (struct iv)); + civ = XNEW (struct iv); *civ = *iv; stmt = SSA_NAME_DEF_STMT (op); @@ -1333,7 +1332,7 @@ find_interesting_uses_cond (struct ivopts_data *data, tree stmt, tree *cond_p) return; } - civ = xmalloc (sizeof (struct iv)); + civ = XNEW (struct iv); *civ = zero_p (iv0->step) ? *iv1: *iv0; record_use (data, cond_p, civ, stmt, USE_COMPARE); } @@ -2032,7 +2031,7 @@ add_candidate_1 (struct ivopts_data *data, if (i == n_iv_cands (data)) { - cand = xcalloc (1, sizeof (struct iv_cand)); + cand = XCNEW (struct iv_cand); cand->id = i; if (!base && !step) @@ -2350,7 +2349,7 @@ alloc_use_cost_map (struct ivopts_data *data) } use->n_map_members = size; - use->cost_map = xcalloc (size, sizeof (struct cost_pair)); + use->cost_map = XCNEWVEC (struct cost_pair, size); } } @@ -3231,7 +3230,7 @@ multiply_by_cost (HOST_WIDE_INT cst, enum machine_mode mode) if (*cached) return (*cached)->cost; - *cached = xmalloc (sizeof (struct mbc_entry)); + *cached = XNEW (struct mbc_entry); (*cached)->mode = mode; (*cached)->cst = cst; @@ -4670,7 +4669,7 @@ static struct iv_ca_delta * iv_ca_delta_add (struct iv_use *use, struct cost_pair *old_cp, struct cost_pair *new_cp, struct iv_ca_delta *next_change) { - struct iv_ca_delta *change = xmalloc (sizeof (struct iv_ca_delta)); + struct iv_ca_delta *change = XNEW (struct iv_ca_delta); change->use = use; change->old_cp = old_cp; @@ -4793,18 +4792,18 @@ iv_ca_delta_free (struct iv_ca_delta **delta) static struct iv_ca * iv_ca_new (struct ivopts_data *data) { - struct iv_ca *nw = xmalloc (sizeof (struct iv_ca)); + struct iv_ca *nw = XNEW (struct iv_ca); nw->upto = 0; nw->bad_uses = 0; - nw->cand_for_use = xcalloc (n_iv_uses (data), sizeof (struct cost_pair *)); - nw->n_cand_uses = xcalloc (n_iv_cands (data), sizeof (unsigned)); + nw->cand_for_use = XCNEWVEC (struct cost_pair *, n_iv_uses (data)); + nw->n_cand_uses = XCNEWVEC (unsigned, n_iv_cands (data)); nw->cands = BITMAP_ALLOC (NULL); nw->n_cands = 0; nw->n_regs = 0; nw->cand_use_cost = 0; nw->cand_cost = 0; - nw->n_invariant_uses = xcalloc (data->max_inv_id + 1, sizeof (unsigned)); + nw->n_invariant_uses = XCNEWVEC (unsigned, data->max_inv_id + 1); nw->cost = 0; return nw; @@ -5922,8 +5921,7 @@ free_loop_data (struct ivopts_data *data) { data->version_info_size = 2 * num_ssa_names; free (data->version_info); - data->version_info = xcalloc (data->version_info_size, - sizeof (struct version_info)); + data->version_info = XCNEWVEC (struct version_info, data->version_info_size); } data->max_inv_id = 0; |