Commit 400e39e3 by Kazu Hirata Committed by Kazu Hirata

bt-load.c, [...]: Remove unnecessary casts.

	* bt-load.c, builtins.c, cfghooks.c, cfgrtl.c, gcse.c,
	ggc-page.c, integrate.c, var-tracking.c, web.c: Remove
	unnecessary casts.

From-SVN: r79811
parent bd8ec6a7
2004-03-21 Kazu Hirata <kazu@cs.umass.edu>
* bt-load.c, builtins.c, cfghooks.c, cfgrtl.c, gcse.c,
ggc-page.c, integrate.c, var-tracking.c, web.c: Remove
unnecessary casts.
2004-03-22 Danny Smith <dannysmith@users.sourceforge.net> 2004-03-22 Danny Smith <dannysmith@users.sourceforge.net>
PR target/14291 PR target/14291
......
...@@ -1385,8 +1385,7 @@ migrate_btr_defs (enum reg_class btr_class, int allow_callee_save) ...@@ -1385,8 +1385,7 @@ migrate_btr_defs (enum reg_class btr_class, int allow_callee_save)
while (!fibheap_empty (all_btr_defs)) while (!fibheap_empty (all_btr_defs))
{ {
btr_def def = btr_def def = fibheap_extract_min (all_btr_defs);
(btr_def) fibheap_extract_min (all_btr_defs);
int min_cost = -fibheap_min_key (all_btr_defs); int min_cost = -fibheap_min_key (all_btr_defs);
if (migrate_btr_def (def, min_cost)) if (migrate_btr_def (def, min_cost))
{ {
......
...@@ -4650,7 +4650,7 @@ expand_builtin_printf (tree arglist, rtx target, enum machine_mode mode, ...@@ -4650,7 +4650,7 @@ expand_builtin_printf (tree arglist, rtx target, enum machine_mode mode,
{ {
/* Create a NUL-terminated string that's one char shorter /* Create a NUL-terminated string that's one char shorter
than the original, stripping off the trailing '\n'. */ than the original, stripping off the trailing '\n'. */
char *newstr = (char *) alloca (len); char *newstr = alloca (len);
memcpy (newstr, fmt_str, len - 1); memcpy (newstr, fmt_str, len - 1);
newstr[len - 1] = 0; newstr[len - 1] = 0;
......
...@@ -206,8 +206,8 @@ dump_bb (basic_block bb, FILE *outf, int indent) ...@@ -206,8 +206,8 @@ dump_bb (basic_block bb, FILE *outf, int indent)
edge e; edge e;
char *s_indent; char *s_indent;
s_indent = (char *) alloca ((size_t) indent + 1); s_indent = alloca ((size_t) indent + 1);
memset ((void *) s_indent, ' ', (size_t) indent); memset (s_indent, ' ', (size_t) indent);
s_indent[indent] = '\0'; s_indent[indent] = '\0';
fprintf (outf, ";;%s basic block %d, loop depth %d, count ", fprintf (outf, ";;%s basic block %d, loop depth %d, count ",
......
...@@ -1665,8 +1665,8 @@ rtl_dump_bb (basic_block bb, FILE *outf, int indent) ...@@ -1665,8 +1665,8 @@ rtl_dump_bb (basic_block bb, FILE *outf, int indent)
rtx last; rtx last;
char *s_indent; char *s_indent;
s_indent = (char *) alloca ((size_t) indent + 1); s_indent = alloca ((size_t) indent + 1);
memset ((void *) s_indent, ' ', (size_t) indent); memset (s_indent, ' ', (size_t) indent);
s_indent[indent] = '\0'; s_indent[indent] = '\0';
fprintf (outf, ";;%s Registers live at start: ", s_indent); fprintf (outf, ";;%s Registers live at start: ", s_indent);
......
...@@ -8366,7 +8366,7 @@ eliminate_partially_redundant_loads (basic_block bb, rtx insn, ...@@ -8366,7 +8366,7 @@ eliminate_partially_redundant_loads (basic_block bb, rtx insn,
ok_count += pred->count; ok_count += pred->count;
if (EDGE_CRITICAL_P (pred)) if (EDGE_CRITICAL_P (pred))
critical_count += pred->count; critical_count += pred->count;
occr = (struct unoccr *) gmalloc (sizeof (struct unoccr)); occr = gmalloc (sizeof (struct unoccr));
occr->insn = avail_insn; occr->insn = avail_insn;
occr->pred = pred; occr->pred = pred;
occr->next = avail_occrs; occr->next = avail_occrs;
...@@ -8377,7 +8377,7 @@ eliminate_partially_redundant_loads (basic_block bb, rtx insn, ...@@ -8377,7 +8377,7 @@ eliminate_partially_redundant_loads (basic_block bb, rtx insn,
not_ok_count += pred->count; not_ok_count += pred->count;
if (EDGE_CRITICAL_P (pred)) if (EDGE_CRITICAL_P (pred))
critical_count += pred->count; critical_count += pred->count;
unoccr = (struct unoccr *) gmalloc (sizeof (struct unoccr)); unoccr = gmalloc (sizeof (struct unoccr));
unoccr->insn = NULL_RTX; unoccr->insn = NULL_RTX;
unoccr->pred = pred; unoccr->pred = pred;
unoccr->next = unavail_occrs; unoccr->next = unavail_occrs;
...@@ -8616,8 +8616,7 @@ compute_hash_table_after_reload (struct hash_table *table) ...@@ -8616,8 +8616,7 @@ compute_hash_table_after_reload (struct hash_table *table)
clear_modify_mem_tables (); clear_modify_mem_tables ();
/* Some working arrays used to track first and last set in each block. */ /* Some working arrays used to track first and last set in each block. */
reg_avail_info = (struct reg_avail_info*) reg_avail_info = gmalloc (max_gcse_regno * sizeof (struct reg_avail_info));
gmalloc (max_gcse_regno * sizeof (struct reg_avail_info));
for (i = 0; i < max_gcse_regno; ++i) for (i = 0; i < max_gcse_regno; ++i)
reg_avail_info[i].last_bb = NULL; reg_avail_info[i].last_bb = NULL;
......
...@@ -652,12 +652,12 @@ static inline char * ...@@ -652,12 +652,12 @@ static inline char *
alloc_anon (char *pref ATTRIBUTE_UNUSED, size_t size) alloc_anon (char *pref ATTRIBUTE_UNUSED, size_t size)
{ {
#ifdef HAVE_MMAP_ANON #ifdef HAVE_MMAP_ANON
char *page = (char *) mmap (pref, size, PROT_READ | PROT_WRITE, char *page = mmap (pref, size, PROT_READ | PROT_WRITE,
MAP_PRIVATE | MAP_ANONYMOUS, -1, 0); MAP_PRIVATE | MAP_ANONYMOUS, -1, 0);
#endif #endif
#ifdef HAVE_MMAP_DEV_ZERO #ifdef HAVE_MMAP_DEV_ZERO
char *page = (char *) mmap (pref, size, PROT_READ | PROT_WRITE, char *page = mmap (pref, size, PROT_READ | PROT_WRITE,
MAP_PRIVATE, G.dev_zero_fd, 0); MAP_PRIVATE, G.dev_zero_fd, 0);
#endif #endif
if (page == (char *) MAP_FAILED) if (page == (char *) MAP_FAILED)
......
...@@ -1667,11 +1667,11 @@ copy_insn_list (rtx insns, struct inline_remap *map, rtx static_chain_value) ...@@ -1667,11 +1667,11 @@ copy_insn_list (rtx insns, struct inline_remap *map, rtx static_chain_value)
tree *mapped_block_p; tree *mapped_block_p;
mapped_block_p mapped_block_p
= (tree *) bsearch (NOTE_BLOCK (insn), = bsearch (NOTE_BLOCK (insn),
&VARRAY_TREE (map->block_map, 0), &VARRAY_TREE (map->block_map, 0),
map->block_map->elements_used, map->block_map->elements_used,
sizeof (tree), sizeof (tree),
find_block); find_block);
if (!mapped_block_p) if (!mapped_block_p)
abort (); abort ();
......
...@@ -1297,8 +1297,8 @@ dataflow_set_different_1 (void **slot, void *data) ...@@ -1297,8 +1297,8 @@ dataflow_set_different_1 (void **slot, void *data)
variable var1, var2; variable var1, var2;
var1 = *(variable *) slot; var1 = *(variable *) slot;
var2 = (variable) htab_find_with_hash (htab, var1->decl, var2 = htab_find_with_hash (htab, var1->decl,
VARIABLE_HASH_VAL (var1->decl)); VARIABLE_HASH_VAL (var1->decl));
if (!var2) if (!var2)
{ {
dataflow_set_different_value = true; dataflow_set_different_value = true;
...@@ -1329,8 +1329,8 @@ dataflow_set_different_2 (void **slot, void *data) ...@@ -1329,8 +1329,8 @@ dataflow_set_different_2 (void **slot, void *data)
variable var1, var2; variable var1, var2;
var1 = *(variable *) slot; var1 = *(variable *) slot;
var2 = (variable) htab_find_with_hash (htab, var1->decl, var2 = htab_find_with_hash (htab, var1->decl,
VARIABLE_HASH_VAL (var1->decl)); VARIABLE_HASH_VAL (var1->decl));
if (!var2) if (!var2)
{ {
dataflow_set_different_value = true; dataflow_set_different_value = true;
...@@ -1671,8 +1671,8 @@ vt_find_locations (void) ...@@ -1671,8 +1671,8 @@ vt_find_locations (void)
/* Compute reverse completion order of depth first search of the CFG /* Compute reverse completion order of depth first search of the CFG
so that the data-flow runs faster. */ so that the data-flow runs faster. */
rc_order = (int *) xmalloc (n_basic_blocks * sizeof (int)); rc_order = xmalloc (n_basic_blocks * sizeof (int));
bb_order = (int *) xmalloc (last_basic_block * sizeof (int)); bb_order = xmalloc (last_basic_block * sizeof (int));
flow_depth_first_order_compute (NULL, rc_order); flow_depth_first_order_compute (NULL, rc_order);
for (i = 0; i < n_basic_blocks; i++) for (i = 0; i < n_basic_blocks; i++)
bb_order[rc_order[i]] = i; bb_order[rc_order[i]] = i;
...@@ -2272,8 +2272,8 @@ emit_notes_for_differences_1 (void **slot, void *data) ...@@ -2272,8 +2272,8 @@ emit_notes_for_differences_1 (void **slot, void *data)
variable old_var, new_var; variable old_var, new_var;
old_var = *(variable *) slot; old_var = *(variable *) slot;
new_var = (variable) htab_find_with_hash (new_vars, old_var->decl, new_var = htab_find_with_hash (new_vars, old_var->decl,
VARIABLE_HASH_VAL (old_var->decl)); VARIABLE_HASH_VAL (old_var->decl));
if (!new_var) if (!new_var)
{ {
...@@ -2305,8 +2305,8 @@ emit_notes_for_differences_2 (void **slot, void *data) ...@@ -2305,8 +2305,8 @@ emit_notes_for_differences_2 (void **slot, void *data)
variable old_var, new_var; variable old_var, new_var;
new_var = *(variable *) slot; new_var = *(variable *) slot;
old_var = (variable) htab_find_with_hash (old_vars, new_var->decl, old_var = htab_find_with_hash (old_vars, new_var->decl,
VARIABLE_HASH_VAL (new_var->decl)); VARIABLE_HASH_VAL (new_var->decl));
if (!old_var) if (!old_var)
{ {
/* Variable has appeared. */ /* Variable has appeared. */
......
...@@ -267,12 +267,10 @@ web_main (void) ...@@ -267,12 +267,10 @@ web_main (void)
df = df_init (); df = df_init ();
df_analyze (df, 0, DF_UD_CHAIN | DF_EQUIV_NOTES); df_analyze (df, 0, DF_UD_CHAIN | DF_EQUIV_NOTES);
def_entry = def_entry = xcalloc (df->n_defs, sizeof (struct web_entry));
(struct web_entry *) xcalloc (df->n_defs, sizeof (struct web_entry)); use_entry = xcalloc (df->n_uses, sizeof (struct web_entry));
use_entry = used = xcalloc (max, sizeof (char));
(struct web_entry *) xcalloc (df->n_uses, sizeof (struct web_entry)); use_addressof = xcalloc (max, sizeof (char));
used = (char *) xcalloc (max, sizeof (char));
use_addressof = (char *) xcalloc (max, sizeof (char));
if (dump_file) if (dump_file)
df_dump (df, DF_UD_CHAIN | DF_DU_CHAIN, dump_file); df_dump (df, DF_UD_CHAIN | DF_DU_CHAIN, dump_file);
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment