summaryrefslogtreecommitdiff
path: root/gcc/bt-load.c
diff options
context:
space:
mode:
authorghazi <ghazi@138bc75d-0d04-0410-961f-82ee72b054a4>2008-06-26 00:28:15 +0000
committerghazi <ghazi@138bc75d-0d04-0410-961f-82ee72b054a4>2008-06-26 00:28:15 +0000
commit364c0c59a6feb76e4a0b2a17a68b165d7321f329 (patch)
tree3626ec88a0d5007c7aaf8ffc7c298754080ebf83 /gcc/bt-load.c
parent2457c75425617823976a1142d6f88c514ca985bc (diff)
downloadgcc-364c0c59a6feb76e4a0b2a17a68b165d7321f329.tar.gz
* alias.c (record_alias_subset, init_alias_analysis): Fix
-Wc++-compat and/or -Wcast-qual warnings. * attribs.c (lookup_attribute_spec): Likewise. * bb-reorder.c (find_traces, rotate_loop, find_traces_1_round, copy_bb, connect_traces, find_rarely_executed_basic_blocks_and_cr): Likewise. * bt-load.c (find_btr_def_group, add_btr_def, new_btr_user, note_btr_set, migrate_btr_defs): Likewise. * builtins.c (result_vector, expand_builtin_memcpy, expand_builtin_mempcpy_args, expand_builtin_strncpy, builtin_memset_read_str, expand_builtin_printf, fold_builtin_memchr, rewrite_call_expr, fold_builtin_printf): Likewise. * caller-save.c (mark_set_regs): Likewise. * calls.c (expand_call, emit_library_call_value_1): Likewise. * cgraph.c (cgraph_edge): Likewise. * combine.c (likely_spilled_retval_1): Likewise. * coverage.c (htab_counts_entry_hash, htab_counts_entry_eq, htab_counts_entry_del, get_coverage_counts): Likewise. * cselib.c (new_elt_list, new_elt_loc_list, entry_and_rtx_equal_p, new_cselib_val): Likewise. * dbgcnt.c (dbg_cnt_process_opt): Likewise. * dbxout.c (dbxout_init, dbxout_type, output_used_types_helper): Likewise. * df-core.c (df_compact_blocks): Likewise. * df-problems.c (df_grow_bb_info, df_chain_create): Likewise. * df-scan.c (df_grow_reg_info, df_ref_create, df_insn_create_insn_record, df_insn_rescan, df_notes_rescan, df_ref_compare, df_ref_create_structure, df_bb_refs_record, df_record_entry_block_defs, df_record_exit_block_uses, df_bb_verify): Likewise. * df.h (DF_REF_EXTRACT_WIDTH_CONST, DF_REF_EXTRACT_OFFSET_CONST, DF_REF_EXTRACT_MODE_CONST): New. * dominance.c (get_immediate_dominator, get_dominated_by, nearest_common_dominator, root_of_dom_tree, iterate_fix_dominators, first_dom_son, next_dom_son): Fix -Wc++-compat and/or -Wcast-qual warnings. * dse.c (clear_alias_set_lookup, get_group_info, gen_rtx_MEM, record_store, replace_read, check_mem_read_rtx, scan_insn, dse_step1, dse_record_singleton_alias_set): Likewise. * dwarf2asm.c (dw2_force_const_mem): Likewise. git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/trunk@137137 138bc75d-0d04-0410-961f-82ee72b054a4
Diffstat (limited to 'gcc/bt-load.c')
-rw-r--r--gcc/bt-load.c15
1 files changed, 7 insertions, 8 deletions
diff --git a/gcc/bt-load.c b/gcc/bt-load.c
index 6feefbbf7af..b0a7fdb4a21 100644
--- a/gcc/bt-load.c
+++ b/gcc/bt-load.c
@@ -279,8 +279,7 @@ find_btr_def_group (btr_def_group *all_btr_def_groups, btr_def def)
if (!this_group)
{
- this_group = obstack_alloc (&migrate_btrl_obstack,
- sizeof (struct btr_def_group_s));
+ this_group = XOBNEW (&migrate_btrl_obstack, struct btr_def_group_s);
this_group->src = def_src;
this_group->members = NULL;
this_group->next = *all_btr_def_groups;
@@ -303,7 +302,7 @@ add_btr_def (fibheap_t all_btr_defs, basic_block bb, int insn_luid, rtx insn,
btr_def_group *all_btr_def_groups)
{
btr_def this
- = obstack_alloc (&migrate_btrl_obstack, sizeof (struct btr_def_s));
+ = XOBNEW (&migrate_btrl_obstack, struct btr_def_s);
this->bb = bb;
this->luid = insn_luid;
this->insn = insn;
@@ -354,7 +353,7 @@ new_btr_user (basic_block bb, int insn_luid, rtx insn)
usep = NULL;
}
use = usep ? *usep : NULL_RTX;
- user = obstack_alloc (&migrate_btrl_obstack, sizeof (struct btr_user_s));
+ user = XOBNEW (&migrate_btrl_obstack, struct btr_user_s);
user->bb = bb;
user->luid = insn_luid;
user->insn = insn;
@@ -425,7 +424,7 @@ typedef struct {
static void
note_btr_set (rtx dest, const_rtx set ATTRIBUTE_UNUSED, void *data)
{
- defs_uses_info *info = data;
+ defs_uses_info *info = (defs_uses_info *) data;
int regno, end_regno;
if (!REG_P (dest))
@@ -1428,14 +1427,14 @@ migrate_btr_defs (enum reg_class btr_class, int allow_callee_save)
first_btr = reg;
}
- btrs_live = xcalloc (n_basic_blocks, sizeof (HARD_REG_SET));
- btrs_live_at_end = xcalloc (n_basic_blocks, sizeof (HARD_REG_SET));
+ btrs_live = XCNEWVEC (HARD_REG_SET, n_basic_blocks);
+ btrs_live_at_end = XCNEWVEC (HARD_REG_SET, n_basic_blocks);
build_btr_def_use_webs (all_btr_defs);
while (!fibheap_empty (all_btr_defs))
{
- btr_def def = fibheap_extract_min (all_btr_defs);
+ btr_def def = (btr_def) fibheap_extract_min (all_btr_defs);
int min_cost = -fibheap_min_key (all_btr_defs);
if (migrate_btr_def (def, min_cost))
{