Commit cceb1885 by Gabriel Dos Reis Committed by Gabriel Dos Reis

tree-inline.c (copy_body_r): Use explicit cast when converting from void *.

        * tree-inline.c (copy_body_r): Use explicit cast when
          converting
        from void *.
        (copy_bb): Likewise.
        (copy_edges_for_bb): Likewise.
        (remap_decl_1): Likewise.
        (estimate_num_insns_1): Likewise.
        * cgraph.c (hash_node): Use explicit cast when converting from
        void *.
        (eq_node): Likewise.
        (cgraph_create_node): Use GGC_CNEW.
        (cgraph_create_edge): Use GGC_NEW.
        (cgraph_remove_node): Use explicit cast when converting from
          void *.
        (hash_varpool_node): Likewise.
        (eq_varpool_node): Likewise.
        (cgraph_varpool_node): Use GGC_CNEW.
        * lambda.h (lambda_vector_new): Use GGC_CNEWVEC.
        * tree-scalar-evolution.c (new_scev_info_str): Use XNEW.
        (eq_scev_info): Use explicit cast when converting from void *.
        (find_var_scev_info): Likewise.
        (set_instantiated_value): Likewise.
        (gather_stats_on_scev_database_1): Likewise.
        * cfgloop.h (simple_loop_desc): Use explicit cast when
          converting
        from void *.
        * c-pch.c (c_common_write_pch): Use XNEWVEC.
        (c_common_read_pch): Likewise.
        * prefix.c (save_string): Use XNEWVEC.
        (translate_name): Use explicit cast when converting from void
          *.
        * c-ppoutput.c (print_line): Use explicit cast when converting
        from void *.
        (pp_dir_change): Likewise.
        * c-cppbuiltin.c (builtin_define_std): Likewise.
        (builtin_define_with_value): Likewise.
        (builtin_define_with_value_n): Likewise.
        (builtin_define_with_int_value): Likewise.
        (builtin_define_type_max): Likewise.
        * c-incpath.c (add_env_var_paths): Use XNEWVEC.
        (add_path): Use XNEW.
        * c-format.c (check_format_info_main): Use GGC_NEW.
        (format_type_warning): Use explicit cast when converting from
          void *.
        * c-typeck.c (alloc_tagged_tu_seen_cache): Use XNEW instead of
        xmalloc. 
        (start_init): Likewise.
        * tree-flow-inline.h (first_referenced_var): Use explicit cast
        when converting from void *.
        (next_referenced_var): Likewise.
        * c-pragma.c (push_alignment): Use GGC_NEW instead of
          ggc_alloc.
        * gensupport.c (lookup_predicate): Use explicit cast to
          convert
        from void *.
        (init_predicate_table): Use XCNEW instead of xcalloc.
        * genpreds.c (process_define_predicate): Likewise.

From-SVN: r108723
parent ef98c52a
2005-12-17 Gabriel Dos Reis <gdr@integrable-solutions.net>
* tree-inline.c (copy_body_r): Use explicit cast when converting
from void *.
(copy_bb): Likewise.
(copy_edges_for_bb): Likewise.
(remap_decl_1): Likewise.
(estimate_num_insns_1): Likewise.
* cgraph.c (hash_node): Use explicit cast when converting from
void *.
(eq_node): Likewise.
(cgraph_create_node): Use GGC_CNEW.
(cgraph_create_edge): Use GGC_NEW.
(cgraph_remove_node): Use explicit cast when converting from void *.
(hash_varpool_node): Likewise.
(eq_varpool_node): Likewise.
(cgraph_varpool_node): Use GGC_CNEW.
* lambda.h (lambda_vector_new): Use GGC_CNEWVEC.
* tree-scalar-evolution.c (new_scev_info_str): Use XNEW.
(eq_scev_info): Use explicit cast when converting from void *.
(find_var_scev_info): Likewise.
(set_instantiated_value): Likewise.
(gather_stats_on_scev_database_1): Likewise.
* cfgloop.h (simple_loop_desc): Use explicit cast when converting
from void *.
* c-pch.c (c_common_write_pch): Use XNEWVEC.
(c_common_read_pch): Likewise.
* prefix.c (save_string): Use XNEWVEC.
(translate_name): Use explicit cast when converting from void *.
* c-ppoutput.c (print_line): Use explicit cast when converting
from void *.
(pp_dir_change): Likewise.
* c-cppbuiltin.c (builtin_define_std): Likewise.
(builtin_define_with_value): Likewise.
(builtin_define_with_value_n): Likewise.
(builtin_define_with_int_value): Likewise.
(builtin_define_type_max): Likewise.
* c-incpath.c (add_env_var_paths): Use XNEWVEC.
(add_path): Use XNEW.
* c-format.c (check_format_info_main): Use GGC_NEW.
(format_type_warning): Use explicit cast when converting from void *.
* c-typeck.c (alloc_tagged_tu_seen_cache): Use XNEW instead of
xmalloc.
(start_init): Likewise.
* tree-flow-inline.h (first_referenced_var): Use explicit cast
when converting from void *.
(next_referenced_var): Likewise.
* c-pragma.c (push_alignment): Use GGC_NEW instead of ggc_alloc.
* gensupport.c (lookup_predicate): Use explicit cast to convert
from void *.
(init_predicate_table): Use XCNEW instead of xcalloc.
* genpreds.c (process_define_predicate): Likewise.
2005-12-17 Danny Berlin <dberlin@dberlin.org> 2005-12-17 Danny Berlin <dberlin@dberlin.org>
Kenneth Zadeck <zadeck@naturalbridge.com> Kenneth Zadeck <zadeck@naturalbridge.com>
......
...@@ -577,7 +577,7 @@ void ...@@ -577,7 +577,7 @@ void
builtin_define_std (const char *macro) builtin_define_std (const char *macro)
{ {
size_t len = strlen (macro); size_t len = strlen (macro);
char *buff = alloca (len + 5); char *buff = (char *) alloca (len + 5);
char *p = buff + 2; char *p = buff + 2;
char *q = p + len; char *q = p + len;
...@@ -623,7 +623,7 @@ builtin_define_with_value (const char *macro, const char *expansion, int is_str) ...@@ -623,7 +623,7 @@ builtin_define_with_value (const char *macro, const char *expansion, int is_str)
if (is_str) if (is_str)
extra += 2; /* space for two quote marks */ extra += 2; /* space for two quote marks */
buf = alloca (mlen + elen + extra); buf = (char *) alloca (mlen + elen + extra);
if (is_str) if (is_str)
sprintf (buf, "%s=\"%s\"", macro, expansion); sprintf (buf, "%s=\"%s\"", macro, expansion);
else else
...@@ -641,7 +641,7 @@ builtin_define_with_value_n (const char *macro, const char *expansion, size_t el ...@@ -641,7 +641,7 @@ builtin_define_with_value_n (const char *macro, const char *expansion, size_t el
size_t mlen = strlen (macro); size_t mlen = strlen (macro);
/* Space for an = and a NUL. */ /* Space for an = and a NUL. */
buf = alloca (mlen + elen + 2); buf = (char *) alloca (mlen + elen + 2);
memcpy (buf, macro, mlen); memcpy (buf, macro, mlen);
buf[mlen] = '='; buf[mlen] = '=';
memcpy (buf + mlen + 1, expansion, elen); memcpy (buf + mlen + 1, expansion, elen);
...@@ -659,7 +659,7 @@ builtin_define_with_int_value (const char *macro, HOST_WIDE_INT value) ...@@ -659,7 +659,7 @@ builtin_define_with_int_value (const char *macro, HOST_WIDE_INT value)
size_t vlen = 18; size_t vlen = 18;
size_t extra = 2; /* space for = and NUL. */ size_t extra = 2; /* space for = and NUL. */
buf = alloca (mlen + vlen + extra); buf = (char *) alloca (mlen + vlen + extra);
memcpy (buf, macro, mlen); memcpy (buf, macro, mlen);
buf[mlen] = '='; buf[mlen] = '=';
sprintf (buf + mlen + 1, HOST_WIDE_INT_PRINT_DEC, value); sprintf (buf + mlen + 1, HOST_WIDE_INT_PRINT_DEC, value);
...@@ -736,7 +736,8 @@ builtin_define_type_max (const char *macro, tree type, int is_long) ...@@ -736,7 +736,8 @@ builtin_define_type_max (const char *macro, tree type, int is_long)
value = values[idx + TYPE_UNSIGNED (type)]; value = values[idx + TYPE_UNSIGNED (type)];
suffix = suffixes[is_long * 2 + TYPE_UNSIGNED (type)]; suffix = suffixes[is_long * 2 + TYPE_UNSIGNED (type)];
buf = alloca (strlen (macro) + 1 + strlen (value) + strlen (suffix) + 1); buf = (char *) alloca (strlen (macro) + 1 + strlen (value)
+ strlen (suffix) + 1);
sprintf (buf, "%s=%s%s", macro, value, suffix); sprintf (buf, "%s=%s%s", macro, value, suffix);
cpp_define (parse_in, buf); cpp_define (parse_in, buf);
......
...@@ -2077,7 +2077,7 @@ check_format_info_main (format_check_results *res, ...@@ -2077,7 +2077,7 @@ check_format_info_main (format_check_results *res,
fci = fci->chain; fci = fci->chain;
if (fci) if (fci)
{ {
wanted_type_ptr = ggc_alloc (sizeof (main_wanted_type)); wanted_type_ptr = GGC_NEW (format_wanted_type);
arg_num++; arg_num++;
wanted_type = *fci->types[length_chars_val].type; wanted_type = *fci->types[length_chars_val].type;
wanted_type_name = fci->types[length_chars_val].name; wanted_type_name = fci->types[length_chars_val].name;
...@@ -2286,7 +2286,7 @@ format_type_warning (const char *descr, const char *format_start, ...@@ -2286,7 +2286,7 @@ format_type_warning (const char *descr, const char *format_start,
this is adequate, but formats taking pointers to functions or this is adequate, but formats taking pointers to functions or
arrays would require the full type to be built up in order to arrays would require the full type to be built up in order to
print it with %T. */ print it with %T. */
p = alloca (pointer_count + 2); p = (char *) alloca (pointer_count + 2);
if (pointer_count == 0) if (pointer_count == 0)
p[0] = 0; p[0] = 0;
else if (c_dialect_cxx ()) else if (c_dialect_cxx ())
......
...@@ -109,7 +109,7 @@ add_env_var_paths (const char *env_var, int chain) ...@@ -109,7 +109,7 @@ add_env_var_paths (const char *env_var, int chain)
path = xstrdup ("."); path = xstrdup (".");
else else
{ {
path = xmalloc (q - p + 1); path = XNEWVEC (char, q - p + 1);
memcpy (path, p, q - p); memcpy (path, p, q - p);
path[q - p] = '\0'; path[q - p] = '\0';
} }
...@@ -340,7 +340,7 @@ add_path (char *path, int chain, int cxx_aware, bool user_supplied_p) ...@@ -340,7 +340,7 @@ add_path (char *path, int chain, int cxx_aware, bool user_supplied_p)
if (*c == '\\') *c = '/'; if (*c == '\\') *c = '/';
#endif #endif
p = xmalloc (sizeof (cpp_dir)); p = XNEW (cpp_dir);
p->next = NULL; p->next = NULL;
p->name = path; p->name = path;
if (chain == SYSTEM || chain == AFTER) if (chain == SYSTEM || chain == AFTER)
......
...@@ -187,7 +187,7 @@ c_common_write_pch (void) ...@@ -187,7 +187,7 @@ c_common_write_pch (void)
if (fwrite (&h, sizeof (h), 1, pch_outfile) != 1) if (fwrite (&h, sizeof (h), 1, pch_outfile) != 1)
fatal_error ("can%'t write %s: %m", pch_file); fatal_error ("can%'t write %s: %m", pch_file);
buf = xmalloc (16384); buf = XNEWVEC (char, 16384);
if (fseek (asm_out_file, asm_file_startpos, SEEK_SET) != 0) if (fseek (asm_out_file, asm_file_startpos, SEEK_SET) != 0)
fatal_error ("can%'t seek in %s: %m", asm_file_name); fatal_error ("can%'t seek in %s: %m", asm_file_name);
...@@ -385,7 +385,7 @@ c_common_read_pch (cpp_reader *pfile, const char *name, ...@@ -385,7 +385,7 @@ c_common_read_pch (cpp_reader *pfile, const char *name,
if (!flag_preprocess_only) if (!flag_preprocess_only)
{ {
unsigned long written; unsigned long written;
char * buf = xmalloc (16384); char * buf = XNEWVEC (char, 16384);
for (written = 0; written < h.asm_size; ) for (written = 0; written < h.asm_size; )
{ {
......
...@@ -246,7 +246,8 @@ print_line (source_location src_loc, const char *special_flags) ...@@ -246,7 +246,8 @@ print_line (source_location src_loc, const char *special_flags)
const struct line_map *map = linemap_lookup (&line_table, src_loc); const struct line_map *map = linemap_lookup (&line_table, src_loc);
size_t to_file_len = strlen (map->to_file); size_t to_file_len = strlen (map->to_file);
unsigned char *to_file_quoted = alloca (to_file_len * 4 + 1); unsigned char *to_file_quoted =
(unsigned char *) alloca (to_file_len * 4 + 1);
unsigned char *p; unsigned char *p;
print.src_line = SOURCE_LINE (map, src_loc); print.src_line = SOURCE_LINE (map, src_loc);
...@@ -368,7 +369,8 @@ void ...@@ -368,7 +369,8 @@ void
pp_dir_change (cpp_reader *pfile ATTRIBUTE_UNUSED, const char *dir) pp_dir_change (cpp_reader *pfile ATTRIBUTE_UNUSED, const char *dir)
{ {
size_t to_file_len = strlen (dir); size_t to_file_len = strlen (dir);
unsigned char *to_file_quoted = alloca (to_file_len * 4 + 1); unsigned char *to_file_quoted =
(unsigned char *) alloca (to_file_len * 4 + 1);
unsigned char *p; unsigned char *p;
/* cpp_quote_string does not nul-terminate, so we have to do it ourselves. */ /* cpp_quote_string does not nul-terminate, so we have to do it ourselves. */
......
...@@ -74,7 +74,7 @@ push_alignment (int alignment, tree id) ...@@ -74,7 +74,7 @@ push_alignment (int alignment, tree id)
{ {
align_stack * entry; align_stack * entry;
entry = ggc_alloc (sizeof (* entry)); entry = GGC_NEW (align_stack);
entry->alignment = alignment; entry->alignment = alignment;
entry->id = id; entry->id = id;
......
...@@ -934,7 +934,7 @@ same_translation_unit_p (tree t1, tree t2) ...@@ -934,7 +934,7 @@ same_translation_unit_p (tree t1, tree t2)
static struct tagged_tu_seen_cache * static struct tagged_tu_seen_cache *
alloc_tagged_tu_seen_cache (tree t1, tree t2) alloc_tagged_tu_seen_cache (tree t1, tree t2)
{ {
struct tagged_tu_seen_cache *tu = xmalloc (sizeof (struct tagged_tu_seen_cache)); struct tagged_tu_seen_cache *tu = XNEW (struct tagged_tu_seen_cache);
tu->next = tagged_tu_seen_base; tu->next = tagged_tu_seen_base;
tu->t1 = t1; tu->t1 = t1;
tu->t2 = t2; tu->t2 = t2;
...@@ -4882,7 +4882,7 @@ void ...@@ -4882,7 +4882,7 @@ void
start_init (tree decl, tree asmspec_tree ATTRIBUTE_UNUSED, int top_level) start_init (tree decl, tree asmspec_tree ATTRIBUTE_UNUSED, int top_level)
{ {
const char *locus; const char *locus;
struct initializer_stack *p = xmalloc (sizeof (struct initializer_stack)); struct initializer_stack *p = XNEW (struct initializer_stack);
p->decl = constructor_decl; p->decl = constructor_decl;
p->require_constant_value = require_constant_value; p->require_constant_value = require_constant_value;
......
...@@ -417,7 +417,7 @@ extern void free_simple_loop_desc (struct loop *loop); ...@@ -417,7 +417,7 @@ extern void free_simple_loop_desc (struct loop *loop);
static inline struct niter_desc * static inline struct niter_desc *
simple_loop_desc (struct loop *loop) simple_loop_desc (struct loop *loop)
{ {
return loop->aux; return (struct niter_desc *) loop->aux;
} }
/* The properties of the target. */ /* The properties of the target. */
......
...@@ -146,7 +146,7 @@ static int eq_node (const void *, const void *); ...@@ -146,7 +146,7 @@ static int eq_node (const void *, const void *);
static hashval_t static hashval_t
hash_node (const void *p) hash_node (const void *p)
{ {
const struct cgraph_node *n = p; const struct cgraph_node *n = (const struct cgraph_node *) p;
return (hashval_t) DECL_UID (n->decl); return (hashval_t) DECL_UID (n->decl);
} }
...@@ -155,7 +155,8 @@ hash_node (const void *p) ...@@ -155,7 +155,8 @@ hash_node (const void *p)
static int static int
eq_node (const void *p1, const void *p2) eq_node (const void *p1, const void *p2)
{ {
const struct cgraph_node *n1 = p1, *n2 = p2; const struct cgraph_node *n1 = (const struct cgraph_node *) p1;
const struct cgraph_node *n2 = (const struct cgraph_node *) p2;
return DECL_UID (n1->decl) == DECL_UID (n2->decl); return DECL_UID (n1->decl) == DECL_UID (n2->decl);
} }
...@@ -165,7 +166,7 @@ cgraph_create_node (void) ...@@ -165,7 +166,7 @@ cgraph_create_node (void)
{ {
struct cgraph_node *node; struct cgraph_node *node;
node = ggc_alloc_cleared (sizeof (*node)); node = GGC_CNEW (struct cgraph_node);
node->next = cgraph_nodes; node->next = cgraph_nodes;
node->uid = cgraph_max_uid++; node->uid = cgraph_max_uid++;
if (cgraph_nodes) if (cgraph_nodes)
...@@ -286,7 +287,7 @@ struct cgraph_edge * ...@@ -286,7 +287,7 @@ struct cgraph_edge *
cgraph_create_edge (struct cgraph_node *caller, struct cgraph_node *callee, cgraph_create_edge (struct cgraph_node *caller, struct cgraph_node *callee,
tree call_stmt, gcov_type count, int nest) tree call_stmt, gcov_type count, int nest)
{ {
struct cgraph_edge *edge = ggc_alloc (sizeof (struct cgraph_edge)); struct cgraph_edge *edge = GGC_NEW (struct cgraph_edge);
#ifdef ENABLE_CHECKING #ifdef ENABLE_CHECKING
struct cgraph_edge *e; struct cgraph_edge *e;
...@@ -472,7 +473,7 @@ cgraph_remove_node (struct cgraph_node *node) ...@@ -472,7 +473,7 @@ cgraph_remove_node (struct cgraph_node *node)
*/ */
if (!kill_body && *slot) if (!kill_body && *slot)
{ {
struct cgraph_node *n = *slot; struct cgraph_node *n = (struct cgraph_node *) *slot;
if (!n->next_clone && !n->global.inlined_to if (!n->next_clone && !n->global.inlined_to
&& (cgraph_global_info_ready && (cgraph_global_info_ready
&& (TREE_ASM_WRITTEN (n->decl) || DECL_EXTERNAL (n->decl)))) && (TREE_ASM_WRITTEN (n->decl) || DECL_EXTERNAL (n->decl))))
...@@ -697,7 +698,7 @@ dump_varpool (FILE *f) ...@@ -697,7 +698,7 @@ dump_varpool (FILE *f)
static hashval_t static hashval_t
hash_varpool_node (const void *p) hash_varpool_node (const void *p)
{ {
const struct cgraph_varpool_node *n = p; const struct cgraph_varpool_node *n = (const struct cgraph_varpool_node *) p;
return (hashval_t) DECL_UID (n->decl); return (hashval_t) DECL_UID (n->decl);
} }
...@@ -706,7 +707,10 @@ hash_varpool_node (const void *p) ...@@ -706,7 +707,10 @@ hash_varpool_node (const void *p)
static int static int
eq_varpool_node (const void *p1, const void *p2) eq_varpool_node (const void *p1, const void *p2)
{ {
const struct cgraph_varpool_node *n1 = p1, *n2 = p2; const struct cgraph_varpool_node *n1 =
(const struct cgraph_varpool_node *) p1;
const struct cgraph_varpool_node *n2 =
(const struct cgraph_varpool_node *) p2;
return DECL_UID (n1->decl) == DECL_UID (n2->decl); return DECL_UID (n1->decl) == DECL_UID (n2->decl);
} }
...@@ -726,7 +730,7 @@ cgraph_varpool_node (tree decl) ...@@ -726,7 +730,7 @@ cgraph_varpool_node (tree decl)
htab_find_slot (cgraph_varpool_hash, &key, INSERT); htab_find_slot (cgraph_varpool_hash, &key, INSERT);
if (*slot) if (*slot)
return *slot; return *slot;
node = ggc_alloc_cleared (sizeof (*node)); node = GGC_CNEW (struct cgraph_varpool_node);
node->decl = decl; node->decl = decl;
node->next = cgraph_varpool_nodes; node->next = cgraph_varpool_nodes;
cgraph_varpool_nodes = node; cgraph_varpool_nodes = node;
......
...@@ -43,7 +43,7 @@ process_define_predicate (rtx defn) ...@@ -43,7 +43,7 @@ process_define_predicate (rtx defn)
return; return;
} }
pred = xcalloc (sizeof (struct pred_data), 1); pred = XCNEW (struct pred_data);
pred->name = XSTR (defn, 0); pred->name = XSTR (defn, 0);
pred->exp = XEXP (defn, 1); pred->exp = XEXP (defn, 1);
pred->c_block = XSTR (defn, 2); pred->c_block = XSTR (defn, 2);
......
...@@ -1200,7 +1200,7 @@ lookup_predicate (const char *name) ...@@ -1200,7 +1200,7 @@ lookup_predicate (const char *name)
{ {
struct pred_data key; struct pred_data key;
key.name = name; key.name = name;
return htab_find (predicate_table, &key); return (struct pred_data *) htab_find (predicate_table, &key);
} }
void void
...@@ -1268,7 +1268,7 @@ init_predicate_table (void) ...@@ -1268,7 +1268,7 @@ init_predicate_table (void)
for (i = 0; i < NUM_KNOWN_STD_PREDS; i++) for (i = 0; i < NUM_KNOWN_STD_PREDS; i++)
{ {
pred = xcalloc (sizeof (struct pred_data), 1); pred = XCNEW (struct pred_data);
pred->name = std_preds[i].name; pred->name = std_preds[i].name;
pred->special = std_preds[i].special; pred->special = std_preds[i].special;
......
...@@ -226,7 +226,7 @@ static inline void print_lambda_vector (FILE *, lambda_vector, int); ...@@ -226,7 +226,7 @@ static inline void print_lambda_vector (FILE *, lambda_vector, int);
static inline lambda_vector static inline lambda_vector
lambda_vector_new (int size) lambda_vector_new (int size)
{ {
return ggc_alloc_cleared (size * sizeof(int)); return GGC_CNEWVEC (int, size);
} }
......
...@@ -115,7 +115,7 @@ get_key_value (char *key) ...@@ -115,7 +115,7 @@ get_key_value (char *key)
static char * static char *
save_string (const char *s, int len) save_string (const char *s, int len)
{ {
char *result = xmalloc (len + 1); char *result = XNEWVEC (char, len + 1);
memcpy (result, s, len); memcpy (result, s, len);
result[len] = 0; result[len] = 0;
...@@ -201,7 +201,7 @@ translate_name (char *name) ...@@ -201,7 +201,7 @@ translate_name (char *name)
keylen++) keylen++)
; ;
key = alloca (keylen + 1); key = (char *) alloca (keylen + 1);
strncpy (key, &name[1], keylen); strncpy (key, &name[1], keylen);
key[keylen] = 0; key[keylen] = 0;
......
...@@ -78,7 +78,8 @@ static inline tree ...@@ -78,7 +78,8 @@ static inline tree
first_referenced_var (referenced_var_iterator *iter) first_referenced_var (referenced_var_iterator *iter)
{ {
struct int_tree_map *itm; struct int_tree_map *itm;
itm = first_htab_element (&iter->hti, referenced_vars); itm = (struct int_tree_map *) first_htab_element (&iter->hti,
referenced_vars);
if (!itm) if (!itm)
return NULL; return NULL;
return itm->to; return itm->to;
...@@ -100,7 +101,7 @@ static inline tree ...@@ -100,7 +101,7 @@ static inline tree
next_referenced_var (referenced_var_iterator *iter) next_referenced_var (referenced_var_iterator *iter)
{ {
struct int_tree_map *itm; struct int_tree_map *itm;
itm = next_htab_element (&iter->hti); itm = (struct int_tree_map *) next_htab_element (&iter->hti);
if (!itm) if (!itm)
return NULL; return NULL;
return itm->to; return itm->to;
......
...@@ -544,7 +544,7 @@ copy_body_r (tree *tp, int *walk_subtrees, void *data) ...@@ -544,7 +544,7 @@ copy_body_r (tree *tp, int *walk_subtrees, void *data)
else /* Else the RETURN_EXPR returns no value. */ else /* Else the RETURN_EXPR returns no value. */
{ {
*tp = NULL; *tp = NULL;
return (void *)1; return (tree) (void *)1;
} }
} }
...@@ -724,7 +724,8 @@ copy_bb (inline_data *id, basic_block bb, int frequency_scale, int count_scale) ...@@ -724,7 +724,8 @@ copy_bb (inline_data *id, basic_block bb, int frequency_scale, int count_scale)
/* create_basic_block() will append every new block to /* create_basic_block() will append every new block to
basic_block_info automatically. */ basic_block_info automatically. */
copy_basic_block = create_basic_block (NULL, (void *) 0, bb->prev_bb->aux); copy_basic_block = create_basic_block (NULL, (void *) 0,
(basic_block) bb->prev_bb->aux);
copy_basic_block->count = bb->count * count_scale / REG_BR_PROB_BASE; copy_basic_block->count = bb->count * count_scale / REG_BR_PROB_BASE;
copy_basic_block->frequency = (bb->frequency copy_basic_block->frequency = (bb->frequency
* frequency_scale / REG_BR_PROB_BASE); * frequency_scale / REG_BR_PROB_BASE);
...@@ -827,7 +828,7 @@ copy_bb (inline_data *id, basic_block bb, int frequency_scale, int count_scale) ...@@ -827,7 +828,7 @@ copy_bb (inline_data *id, basic_block bb, int frequency_scale, int count_scale)
static void static void
copy_edges_for_bb (basic_block bb, int count_scale) copy_edges_for_bb (basic_block bb, int count_scale)
{ {
basic_block new_bb = bb->aux; basic_block new_bb = (basic_block) bb->aux;
edge_iterator ei; edge_iterator ei;
edge old_edge; edge old_edge;
block_stmt_iterator bsi; block_stmt_iterator bsi;
...@@ -846,7 +847,7 @@ copy_edges_for_bb (basic_block bb, int count_scale) ...@@ -846,7 +847,7 @@ copy_edges_for_bb (basic_block bb, int count_scale)
if (old_edge->dest->index == EXIT_BLOCK && !old_edge->flags if (old_edge->dest->index == EXIT_BLOCK && !old_edge->flags
&& old_edge->dest->aux != EXIT_BLOCK_PTR) && old_edge->dest->aux != EXIT_BLOCK_PTR)
flags |= EDGE_FALLTHRU; flags |= EDGE_FALLTHRU;
new = make_edge (new_bb, old_edge->dest->aux, flags); new = make_edge (new_bb, (basic_block) old_edge->dest->aux, flags);
new->count = old_edge->count * count_scale / REG_BR_PROB_BASE; new->count = old_edge->count * count_scale / REG_BR_PROB_BASE;
new->probability = old_edge->probability; new->probability = old_edge->probability;
} }
...@@ -895,7 +896,7 @@ copy_edges_for_bb (basic_block bb, int count_scale) ...@@ -895,7 +896,7 @@ copy_edges_for_bb (basic_block bb, int count_scale)
static tree static tree
remap_decl_1 (tree decl, void *data) remap_decl_1 (tree decl, void *data)
{ {
return remap_decl (decl, data); return remap_decl (decl, (inline_data *) data);
} }
/* Make a copy of the body of FN so that it can be inserted inline in /* Make a copy of the body of FN so that it can be inserted inline in
...@@ -1614,7 +1615,7 @@ estimate_move_cost (tree type) ...@@ -1614,7 +1615,7 @@ estimate_move_cost (tree type)
static tree static tree
estimate_num_insns_1 (tree *tp, int *walk_subtrees, void *data) estimate_num_insns_1 (tree *tp, int *walk_subtrees, void *data)
{ {
int *count = data; int *count = (int *) data;
tree x = *tp; tree x = *tp;
if (IS_TYPE_OR_DECL_P (x)) if (IS_TYPE_OR_DECL_P (x))
......
...@@ -296,7 +296,7 @@ new_scev_info_str (tree var) ...@@ -296,7 +296,7 @@ new_scev_info_str (tree var)
{ {
struct scev_info_str *res; struct scev_info_str *res;
res = xmalloc (sizeof (struct scev_info_str)); res = XNEW (struct scev_info_str);
res->var = var; res->var = var;
res->chrec = chrec_not_analyzed_yet; res->chrec = chrec_not_analyzed_yet;
...@@ -316,8 +316,8 @@ hash_scev_info (const void *elt) ...@@ -316,8 +316,8 @@ hash_scev_info (const void *elt)
static int static int
eq_scev_info (const void *e1, const void *e2) eq_scev_info (const void *e1, const void *e2)
{ {
const struct scev_info_str *elt1 = e1; const struct scev_info_str *elt1 = (const struct scev_info_str *) e1;
const struct scev_info_str *elt2 = e2; const struct scev_info_str *elt2 = (const struct scev_info_str *) e2;
return elt1->var == elt2->var; return elt1->var == elt2->var;
} }
...@@ -346,7 +346,7 @@ find_var_scev_info (tree var) ...@@ -346,7 +346,7 @@ find_var_scev_info (tree var)
if (!*slot) if (!*slot)
*slot = new_scev_info_str (var); *slot = new_scev_info_str (var);
res = *slot; res = (struct scev_info_str *) *slot;
return &res->chrec; return &res->chrec;
} }
...@@ -1886,10 +1886,9 @@ set_instantiated_value (htab_t cache, tree version, tree val) ...@@ -1886,10 +1886,9 @@ set_instantiated_value (htab_t cache, tree version, tree val)
pattern.var = version; pattern.var = version;
slot = htab_find_slot (cache, &pattern, INSERT); slot = htab_find_slot (cache, &pattern, INSERT);
if (*slot) if (!*slot)
info = *slot; *slot = new_scev_info_str (version);
else info = (struct scev_info_str *) *slot;
info = *slot = new_scev_info_str (version);
info->chrec = val; info->chrec = val;
} }
...@@ -2479,9 +2478,9 @@ analyze_scalar_evolution_for_all_loop_phi_nodes (VEC(tree,heap) **exit_condition ...@@ -2479,9 +2478,9 @@ analyze_scalar_evolution_for_all_loop_phi_nodes (VEC(tree,heap) **exit_condition
static int static int
gather_stats_on_scev_database_1 (void **slot, void *stats) gather_stats_on_scev_database_1 (void **slot, void *stats)
{ {
struct scev_info_str *entry = *slot; struct scev_info_str *entry = (struct scev_info_str *) *slot;
gather_chrec_stats (entry->chrec, stats); gather_chrec_stats (entry->chrec, (struct chrec_stats *) stats);
return 1; return 1;
} }
......
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