Commit c22940cd by Thomas Neumann Committed by Thomas Neumann

tree-ssa-alias-warnings.c (maybe_add_match): Cast according to the coding conventions.

	* tree-ssa-alias-warnings.c (maybe_add_match): Cast according to the
	coding conventions.
	(add_key): Likewise.
	* tree-ssa.c (init_tree_ssa): Use type safe memory macros.
	* tree-ssa-ccp.c (ccp_fold_builtin): Avoid using C++ keywords as
	variable names.
	* tree-ssa-coalesce.c (find_coalesce_pair): Use type safe memory macros.
	(add_cost_one_coalesce): Likewise.
	* tree-ssa-copy.c (merge_alias_info): Avoid using C++ keywords as
	variable names. Rename orig to orig_name for consistency.
	* tree-ssa-dom.c (dom_thread_across_edge): Cast according to the coding
	conventions.
	(cprop_into_successor_phis): Avoid using C++ keywords as variable names.
	(record_equivalences_from_stmt): Likewise.
	* tree-ssa-dse.c (dse_initialize_block_local_data): Cast according to
	the coding conventions.
	(memory_ssa_name_same): Likewise.
	(dse_optimize_stmt): Likewise.
	(dse_record_phis): Likewise.
	(dse_finalize_block): Likewise.
	* tree-ssa-loop-im.c (outermost_invariant_loop_expr): Avoid using C++
	keywords as variable names.
	(may_move_till): Cast according to the coding conventions.
	(force_move_till_expr): Avoid using C++ keywords as variable names.
	(force_move_till): Cast according to the coding conventions.
	(memref_hash): Likewise.
	(memref_eq): Likewise.
	(gather_mem_refs_stmt): Likewise.
	* tree-ssa-loop-ivopts.c (contains_abnormal_ssa_name_p): Avoid using C++
	keywords as variable names.
	(idx_find_step): Cast according to the coding conventions.
	(idx_record_use): Likewise.
	(find_depends): Likewise.
	(prepare_decl_rtl): Likewise.
	(mbc_entry_hash): Likewise.
	(mbc_entry_eq): Likewise.
	* tree-ssa-loop-niter.c (SWAP): Use the correct the type for tmp.
	(simplify_replace_tree): Avoid using C++ keywords as variable names.
	(idx_infer_loop_bounds): Cast according to the coding conventions.
	* tree-ssa-loop-prefetch.c (idx_analyze_ref): Likewise.
	* tree-ssa-math-opts.c (occ_new ): Likwise.
	* tree-ssanames.c (duplicate_ssa_name_ptr_info): Use type safe memory
	macros.
	* tree-ssa-operands.c (add_def_op): Avoid using C++ keywords as variable
	names.
	(add_use_op): Likewise.
	(add_vop): Likewise.
	(add_vuse_op): Likewise.
	(add_vdef_op): Likewise.
	(get_expr_operands): Likewise.
	(push_stmt_changes): Use type safe memory macros.
	* tree-ssa-phiopt.c (replace_phi_edge_with_variable): Avoid using C++
	keywords as variable names.
	(conditional_replacement): Likewise.
	(minmax_replacement): Likewise.
	(abs_replacement): Likewise.
	* tree-ssa-pre.c (create_expression_by_pieces): Cast according to the
	coding conventions.
	(insert_fake_stores): Avoid using C++ keywords as variable names.
	* tree-ssa-reassoc.c (add_to_ops_vec): Cast according to the coding
	conventions.
	* tree-ssa-structalias.c (heapvar_lookup): Likewise.
	(heapvar_insert): Use type safe memory macros.
	(new_var_info): Cast according to the coding conventions.
	(new_constraint): Likewise.
	(remove_preds_and_fake_succs): Use type safe memory macros.
	* tree-ssa-threadupdate.c (thread_block): Cast according to the coding
	conventions.
	(thread_single_edge): Likewise.

From-SVN: r125504
parent 266a2cba
2007-06-06 Thomas Neumann <tneumann@users.sourceforge.net>
* tree-ssa-alias-warnings.c (maybe_add_match): Cast according to the
coding conventions.
(add_key): Likewise.
* tree-ssa.c (init_tree_ssa): Use type safe memory macros.
* tree-ssa-ccp.c (ccp_fold_builtin): Avoid using C++ keywords as
variable names.
* tree-ssa-coalesce.c (find_coalesce_pair): Use type safe memory macros.
(add_cost_one_coalesce): Likewise.
* tree-ssa-copy.c (merge_alias_info): Avoid using C++ keywords as
variable names. Rename orig to orig_name for consistency.
* tree-ssa-dom.c (dom_thread_across_edge): Cast according to the coding
conventions.
(cprop_into_successor_phis): Avoid using C++ keywords as variable names.
(record_equivalences_from_stmt): Likewise.
* tree-ssa-dse.c (dse_initialize_block_local_data): Cast according to
the coding conventions.
(memory_ssa_name_same): Likewise.
(dse_optimize_stmt): Likewise.
(dse_record_phis): Likewise.
(dse_finalize_block): Likewise.
* tree-ssa-loop-im.c (outermost_invariant_loop_expr): Avoid using C++
keywords as variable names.
(may_move_till): Cast according to the coding conventions.
(force_move_till_expr): Avoid using C++ keywords as variable names.
(force_move_till): Cast according to the coding conventions.
(memref_hash): Likewise.
(memref_eq): Likewise.
(gather_mem_refs_stmt): Likewise.
* tree-ssa-loop-ivopts.c (contains_abnormal_ssa_name_p): Avoid using C++
keywords as variable names.
(idx_find_step): Cast according to the coding conventions.
(idx_record_use): Likewise.
(find_depends): Likewise.
(prepare_decl_rtl): Likewise.
(mbc_entry_hash): Likewise.
(mbc_entry_eq): Likewise.
* tree-ssa-loop-niter.c (SWAP): Use the correct the type for tmp.
(simplify_replace_tree): Avoid using C++ keywords as variable names.
(idx_infer_loop_bounds): Cast according to the coding conventions.
* tree-ssa-loop-prefetch.c (idx_analyze_ref): Likewise.
* tree-ssa-math-opts.c (occ_new ): Likwise.
* tree-ssanames.c (duplicate_ssa_name_ptr_info): Use type safe memory
macros.
* tree-ssa-operands.c (add_def_op): Avoid using C++ keywords as variable
names.
(add_use_op): Likewise.
(add_vop): Likewise.
(add_vuse_op): Likewise.
(add_vdef_op): Likewise.
(get_expr_operands): Likewise.
(push_stmt_changes): Use type safe memory macros.
* tree-ssa-phiopt.c (replace_phi_edge_with_variable): Avoid using C++
keywords as variable names.
(conditional_replacement): Likewise.
(minmax_replacement): Likewise.
(abs_replacement): Likewise.
* tree-ssa-pre.c (create_expression_by_pieces): Cast according to the
coding conventions.
(insert_fake_stores): Avoid using C++ keywords as variable names.
* tree-ssa-reassoc.c (add_to_ops_vec): Cast according to the coding
conventions.
* tree-ssa-structalias.c (heapvar_lookup): Likewise.
(heapvar_insert): Use type safe memory macros.
(new_var_info): Cast according to the coding conventions.
(new_constraint): Likewise.
(remove_preds_and_fake_succs): Use type safe memory macros.
* tree-ssa-threadupdate.c (thread_block): Cast according to the coding
conventions.
(thread_single_edge): Likewise.
(thread_through_loop_header): Likewise.
2007-06-06 Eric Christopher <echristo@apple.com> 2007-06-06 Eric Christopher <echristo@apple.com>
* config/i386/i386.c (override_options): Move handling * config/i386/i386.c (override_options): Move handling
......
...@@ -379,7 +379,7 @@ match (htab_t ref_map, tree key) ...@@ -379,7 +379,7 @@ match (htab_t ref_map, tree key)
static inline void static inline void
maybe_add_match (htab_t ref_map, struct tree_map *key) maybe_add_match (htab_t ref_map, struct tree_map *key)
{ {
struct tree_map *found = htab_find (ref_map, key); struct tree_map *found = (struct tree_map *) htab_find (ref_map, key);
if (found && !found->to) if (found && !found->to)
found->to = key->to; found->to = key->to;
...@@ -392,7 +392,7 @@ static void ...@@ -392,7 +392,7 @@ static void
add_key (htab_t ht, tree t, alloc_pool references_pool) add_key (htab_t ht, tree t, alloc_pool references_pool)
{ {
void **slot; void **slot;
struct tree_map *tp = pool_alloc (references_pool); struct tree_map *tp = (struct tree_map *) pool_alloc (references_pool);
tp->base.from = t; tp->base.from = t;
tp->to = NULL_TREE; tp->to = NULL_TREE;
......
...@@ -2395,14 +2395,14 @@ ccp_fold_builtin (tree stmt, tree fn) ...@@ -2395,14 +2395,14 @@ ccp_fold_builtin (tree stmt, tree fn)
case BUILT_IN_STRLEN: case BUILT_IN_STRLEN:
if (val[0]) if (val[0])
{ {
tree new = fold_convert (TREE_TYPE (fn), val[0]); tree new_val = fold_convert (TREE_TYPE (fn), val[0]);
/* If the result is not a valid gimple value, or not a cast /* If the result is not a valid gimple value, or not a cast
of a valid gimple value, then we can not use the result. */ of a valid gimple value, then we can not use the result. */
if (is_gimple_val (new) if (is_gimple_val (new_val)
|| (is_gimple_cast (new) || (is_gimple_cast (new_val)
&& is_gimple_val (TREE_OPERAND (new, 0)))) && is_gimple_val (TREE_OPERAND (new_val, 0))))
return new; return new_val;
} }
break; break;
......
...@@ -260,7 +260,7 @@ find_coalesce_pair (coalesce_list_p cl, int p1, int p2, bool create) ...@@ -260,7 +260,7 @@ find_coalesce_pair (coalesce_list_p cl, int p1, int p2, bool create)
if (create && !pair) if (create && !pair)
{ {
gcc_assert (cl->sorted == NULL); gcc_assert (cl->sorted == NULL);
pair = xmalloc (sizeof (struct coalesce_pair)); pair = XNEW (struct coalesce_pair);
pair->first_element = p.first_element; pair->first_element = p.first_element;
pair->second_element = p.second_element; pair->second_element = p.second_element;
pair->cost = 0; pair->cost = 0;
...@@ -276,7 +276,7 @@ add_cost_one_coalesce (coalesce_list_p cl, int p1, int p2) ...@@ -276,7 +276,7 @@ add_cost_one_coalesce (coalesce_list_p cl, int p1, int p2)
{ {
cost_one_pair_p pair; cost_one_pair_p pair;
pair = xmalloc (sizeof (struct cost_one_pair_d)); pair = XNEW (struct cost_one_pair_d);
pair->first_element = p1; pair->first_element = p1;
pair->second_element = p2; pair->second_element = p2;
pair->next = cl->cost_one_list; pair->next = cl->cost_one_list;
......
...@@ -199,31 +199,31 @@ may_propagate_copy_into_asm (tree dest) ...@@ -199,31 +199,31 @@ may_propagate_copy_into_asm (tree dest)
they both share the same memory tags. */ they both share the same memory tags. */
void void
merge_alias_info (tree orig, tree new) merge_alias_info (tree orig_name, tree new_name)
{ {
tree new_sym = SSA_NAME_VAR (new); tree new_sym = SSA_NAME_VAR (new_name);
tree orig_sym = SSA_NAME_VAR (orig); tree orig_sym = SSA_NAME_VAR (orig_name);
var_ann_t new_ann = var_ann (new_sym); var_ann_t new_ann = var_ann (new_sym);
var_ann_t orig_ann = var_ann (orig_sym); var_ann_t orig_ann = var_ann (orig_sym);
/* No merging necessary when memory partitions are involved. */ /* No merging necessary when memory partitions are involved. */
if (factoring_name_p (new)) if (factoring_name_p (new_name))
{ {
gcc_assert (!is_gimple_reg (orig_sym)); gcc_assert (!is_gimple_reg (orig_sym));
return; return;
} }
else if (factoring_name_p (orig)) else if (factoring_name_p (orig_name))
{ {
gcc_assert (!is_gimple_reg (new_sym)); gcc_assert (!is_gimple_reg (new_sym));
return; return;
} }
gcc_assert (POINTER_TYPE_P (TREE_TYPE (orig))); gcc_assert (POINTER_TYPE_P (TREE_TYPE (orig_name)));
gcc_assert (POINTER_TYPE_P (TREE_TYPE (new))); gcc_assert (POINTER_TYPE_P (TREE_TYPE (new_name)));
#if defined ENABLE_CHECKING #if defined ENABLE_CHECKING
gcc_assert (lang_hooks.types_compatible_p (TREE_TYPE (orig), gcc_assert (lang_hooks.types_compatible_p (TREE_TYPE (orig_name),
TREE_TYPE (new))); TREE_TYPE (new_name)));
/* If the pointed-to alias sets are different, these two pointers /* If the pointed-to alias sets are different, these two pointers
would never have the same memory tag. In this case, NEW should would never have the same memory tag. In this case, NEW should
...@@ -259,10 +259,10 @@ merge_alias_info (tree orig, tree new) ...@@ -259,10 +259,10 @@ merge_alias_info (tree orig, tree new)
Since we cannot distinguish one case from another in this Since we cannot distinguish one case from another in this
function, we can only make sure that if P_i and Q_j have function, we can only make sure that if P_i and Q_j have
flow-sensitive information, they should be compatible. */ flow-sensitive information, they should be compatible. */
if (SSA_NAME_PTR_INFO (orig) && SSA_NAME_PTR_INFO (new)) if (SSA_NAME_PTR_INFO (orig_name) && SSA_NAME_PTR_INFO (new_name))
{ {
struct ptr_info_def *orig_ptr_info = SSA_NAME_PTR_INFO (orig); struct ptr_info_def *orig_ptr_info = SSA_NAME_PTR_INFO (orig_name);
struct ptr_info_def *new_ptr_info = SSA_NAME_PTR_INFO (new); struct ptr_info_def *new_ptr_info = SSA_NAME_PTR_INFO (new_name);
/* Note that pointer NEW and ORIG may actually have different /* Note that pointer NEW and ORIG may actually have different
pointed-to variables (e.g., PR 18291 represented in pointed-to variables (e.g., PR 18291 represented in
......
...@@ -569,7 +569,7 @@ dom_thread_across_edge (struct dom_walk_data *walk_data, edge e) ...@@ -569,7 +569,7 @@ dom_thread_across_edge (struct dom_walk_data *walk_data, edge e)
walk_data->global_data = dummy_cond; walk_data->global_data = dummy_cond;
} }
thread_across_edge (walk_data->global_data, e, false, thread_across_edge ((tree) walk_data->global_data, e, false,
&const_and_copies_stack, &const_and_copies_stack,
simplify_stmt_for_jump_threading); simplify_stmt_for_jump_threading);
} }
...@@ -1239,26 +1239,26 @@ cprop_into_successor_phis (basic_block bb) ...@@ -1239,26 +1239,26 @@ cprop_into_successor_phis (basic_block bb)
indx = e->dest_idx; indx = e->dest_idx;
for ( ; phi; phi = PHI_CHAIN (phi)) for ( ; phi; phi = PHI_CHAIN (phi))
{ {
tree new; tree new_val;
use_operand_p orig_p; use_operand_p orig_p;
tree orig; tree orig_val;
/* The alternative may be associated with a constant, so verify /* The alternative may be associated with a constant, so verify
it is an SSA_NAME before doing anything with it. */ it is an SSA_NAME before doing anything with it. */
orig_p = PHI_ARG_DEF_PTR (phi, indx); orig_p = PHI_ARG_DEF_PTR (phi, indx);
orig = USE_FROM_PTR (orig_p); orig_val = USE_FROM_PTR (orig_p);
if (TREE_CODE (orig) != SSA_NAME) if (TREE_CODE (orig_val) != SSA_NAME)
continue; continue;
/* If we have *ORIG_P in our constant/copy table, then replace /* If we have *ORIG_P in our constant/copy table, then replace
ORIG_P with its value in our constant/copy table. */ ORIG_P with its value in our constant/copy table. */
new = SSA_NAME_VALUE (orig); new_val = SSA_NAME_VALUE (orig_val);
if (new if (new_val
&& new != orig && new_val != orig_val
&& (TREE_CODE (new) == SSA_NAME && (TREE_CODE (new_val) == SSA_NAME
|| is_gimple_min_invariant (new)) || is_gimple_min_invariant (new_val))
&& may_propagate_copy (orig, new)) && may_propagate_copy (orig_val, new_val))
propagate_value (orig_p, new); propagate_value (orig_p, new_val);
} }
} }
} }
...@@ -1591,7 +1591,7 @@ record_equivalences_from_stmt (tree stmt, int may_optimize_p, stmt_ann_t ann) ...@@ -1591,7 +1591,7 @@ record_equivalences_from_stmt (tree stmt, int may_optimize_p, stmt_ann_t ann)
&& !is_gimple_reg (lhs)) && !is_gimple_reg (lhs))
{ {
tree rhs = GIMPLE_STMT_OPERAND (stmt, 1); tree rhs = GIMPLE_STMT_OPERAND (stmt, 1);
tree new; tree new_stmt;
/* FIXME: If the LHS of the assignment is a bitfield and the RHS /* FIXME: If the LHS of the assignment is a bitfield and the RHS
is a constant, we need to adjust the constant to fit into the is a constant, we need to adjust the constant to fit into the
...@@ -1617,13 +1617,13 @@ record_equivalences_from_stmt (tree stmt, int may_optimize_p, stmt_ann_t ann) ...@@ -1617,13 +1617,13 @@ record_equivalences_from_stmt (tree stmt, int may_optimize_p, stmt_ann_t ann)
if (rhs) if (rhs)
{ {
/* Build a new statement with the RHS and LHS exchanged. */ /* Build a new statement with the RHS and LHS exchanged. */
new = build_gimple_modify_stmt (rhs, lhs); new_stmt = build_gimple_modify_stmt (rhs, lhs);
create_ssa_artificial_load_stmt (new, stmt); create_ssa_artificial_load_stmt (new_stmt, stmt);
/* Finally enter the statement into the available expression /* Finally enter the statement into the available expression
table. */ table. */
lookup_avail_expr (new, true); lookup_avail_expr (new_stmt, true);
} }
} }
} }
......
...@@ -168,7 +168,8 @@ dse_initialize_block_local_data (struct dom_walk_data *walk_data, ...@@ -168,7 +168,8 @@ dse_initialize_block_local_data (struct dom_walk_data *walk_data,
bool recycled) bool recycled)
{ {
struct dse_block_local_data *bd struct dse_block_local_data *bd
= VEC_last (void_p, walk_data->block_data_stack); = (struct dse_block_local_data *)
VEC_last (void_p, walk_data->block_data_stack);
/* If we are given a recycled block local data structure, ensure any /* If we are given a recycled block local data structure, ensure any
bitmap associated with the block is cleared. */ bitmap associated with the block is cleared. */
...@@ -190,7 +191,7 @@ static tree ...@@ -190,7 +191,7 @@ static tree
memory_ssa_name_same (tree *expr_p, int *walk_subtrees ATTRIBUTE_UNUSED, memory_ssa_name_same (tree *expr_p, int *walk_subtrees ATTRIBUTE_UNUSED,
void *data) void *data)
{ {
struct address_walk_data *walk_data = data; struct address_walk_data *walk_data = (struct address_walk_data *) data;
tree expr = *expr_p; tree expr = *expr_p;
tree def_stmt; tree def_stmt;
basic_block def_bb; basic_block def_bb;
...@@ -615,8 +616,10 @@ dse_optimize_stmt (struct dom_walk_data *walk_data, ...@@ -615,8 +616,10 @@ dse_optimize_stmt (struct dom_walk_data *walk_data,
block_stmt_iterator bsi) block_stmt_iterator bsi)
{ {
struct dse_block_local_data *bd struct dse_block_local_data *bd
= VEC_last (void_p, walk_data->block_data_stack); = (struct dse_block_local_data *)
struct dse_global_data *dse_gd = walk_data->global_data; VEC_last (void_p, walk_data->block_data_stack);
struct dse_global_data *dse_gd
= (struct dse_global_data *) walk_data->global_data;
tree stmt = bsi_stmt (bsi); tree stmt = bsi_stmt (bsi);
stmt_ann_t ann = stmt_ann (stmt); stmt_ann_t ann = stmt_ann (stmt);
...@@ -722,8 +725,10 @@ static void ...@@ -722,8 +725,10 @@ static void
dse_record_phis (struct dom_walk_data *walk_data, basic_block bb) dse_record_phis (struct dom_walk_data *walk_data, basic_block bb)
{ {
struct dse_block_local_data *bd struct dse_block_local_data *bd
= VEC_last (void_p, walk_data->block_data_stack); = (struct dse_block_local_data *)
struct dse_global_data *dse_gd = walk_data->global_data; VEC_last (void_p, walk_data->block_data_stack);
struct dse_global_data *dse_gd
= (struct dse_global_data *) walk_data->global_data;
tree phi; tree phi;
for (phi = phi_nodes (bb); phi; phi = PHI_CHAIN (phi)) for (phi = phi_nodes (bb); phi; phi = PHI_CHAIN (phi))
...@@ -738,8 +743,10 @@ dse_finalize_block (struct dom_walk_data *walk_data, ...@@ -738,8 +743,10 @@ dse_finalize_block (struct dom_walk_data *walk_data,
basic_block bb ATTRIBUTE_UNUSED) basic_block bb ATTRIBUTE_UNUSED)
{ {
struct dse_block_local_data *bd struct dse_block_local_data *bd
= VEC_last (void_p, walk_data->block_data_stack); = (struct dse_block_local_data *)
struct dse_global_data *dse_gd = walk_data->global_data; VEC_last (void_p, walk_data->block_data_stack);
struct dse_global_data *dse_gd
= (struct dse_global_data *) walk_data->global_data;
bitmap stores = dse_gd->stores; bitmap stores = dse_gd->stores;
unsigned int i; unsigned int i;
bitmap_iterator bi; bitmap_iterator bi;
......
...@@ -330,7 +330,7 @@ outermost_invariant_loop (tree def, struct loop *loop) ...@@ -330,7 +330,7 @@ outermost_invariant_loop (tree def, struct loop *loop)
static struct loop * static struct loop *
outermost_invariant_loop_expr (tree expr, struct loop *loop) outermost_invariant_loop_expr (tree expr, struct loop *loop)
{ {
enum tree_code_class class = TREE_CODE_CLASS (TREE_CODE (expr)); enum tree_code_class codeclass = TREE_CODE_CLASS (TREE_CODE (expr));
unsigned i, nops; unsigned i, nops;
struct loop *max_loop = superloop_at_depth (loop, 1), *aloop; struct loop *max_loop = superloop_at_depth (loop, 1), *aloop;
...@@ -339,11 +339,11 @@ outermost_invariant_loop_expr (tree expr, struct loop *loop) ...@@ -339,11 +339,11 @@ outermost_invariant_loop_expr (tree expr, struct loop *loop)
|| is_gimple_min_invariant (expr)) || is_gimple_min_invariant (expr))
return outermost_invariant_loop (expr, loop); return outermost_invariant_loop (expr, loop);
if (class != tcc_unary if (codeclass != tcc_unary
&& class != tcc_binary && codeclass != tcc_binary
&& class != tcc_expression && codeclass != tcc_expression
&& class != tcc_vl_exp && codeclass != tcc_vl_exp
&& class != tcc_comparison) && codeclass != tcc_comparison)
return NULL; return NULL;
nops = TREE_OPERAND_LENGTH (expr); nops = TREE_OPERAND_LENGTH (expr);
...@@ -883,7 +883,7 @@ move_computations (void) ...@@ -883,7 +883,7 @@ move_computations (void)
static bool static bool
may_move_till (tree ref, tree *index, void *data) may_move_till (tree ref, tree *index, void *data)
{ {
struct loop *loop = data, *max_loop; struct loop *loop = (struct loop*) data, *max_loop;
/* If REF is an array reference, check also that the step and the lower /* If REF is an array reference, check also that the step and the lower
bound is invariant in LOOP. */ bound is invariant in LOOP. */
...@@ -914,7 +914,7 @@ may_move_till (tree ref, tree *index, void *data) ...@@ -914,7 +914,7 @@ may_move_till (tree ref, tree *index, void *data)
static void static void
force_move_till_expr (tree expr, struct loop *orig_loop, struct loop *loop) force_move_till_expr (tree expr, struct loop *orig_loop, struct loop *loop)
{ {
enum tree_code_class class = TREE_CODE_CLASS (TREE_CODE (expr)); enum tree_code_class codeclass = TREE_CODE_CLASS (TREE_CODE (expr));
unsigned i, nops; unsigned i, nops;
if (TREE_CODE (expr) == SSA_NAME) if (TREE_CODE (expr) == SSA_NAME)
...@@ -927,11 +927,11 @@ force_move_till_expr (tree expr, struct loop *orig_loop, struct loop *loop) ...@@ -927,11 +927,11 @@ force_move_till_expr (tree expr, struct loop *orig_loop, struct loop *loop)
return; return;
} }
if (class != tcc_unary if (codeclass != tcc_unary
&& class != tcc_binary && codeclass != tcc_binary
&& class != tcc_expression && codeclass != tcc_expression
&& class != tcc_vl_exp && codeclass != tcc_vl_exp
&& class != tcc_comparison) && codeclass != tcc_comparison)
return; return;
nops = TREE_OPERAND_LENGTH (expr); nops = TREE_OPERAND_LENGTH (expr);
...@@ -953,7 +953,7 @@ static bool ...@@ -953,7 +953,7 @@ static bool
force_move_till (tree ref, tree *index, void *data) force_move_till (tree ref, tree *index, void *data)
{ {
tree stmt; tree stmt;
struct fmt_data *fmt_data = data; struct fmt_data *fmt_data = (struct fmt_data *) data;
if (TREE_CODE (ref) == ARRAY_REF) if (TREE_CODE (ref) == ARRAY_REF)
{ {
...@@ -1285,9 +1285,7 @@ loop_suitable_for_sm (struct loop *loop ATTRIBUTE_UNUSED, ...@@ -1285,9 +1285,7 @@ loop_suitable_for_sm (struct loop *loop ATTRIBUTE_UNUSED,
static hashval_t static hashval_t
memref_hash (const void *obj) memref_hash (const void *obj)
{ {
const struct mem_ref *mem = obj; return ((const struct mem_ref *) obj)->hash;
return mem->hash;
} }
/* An equality function for struct mem_ref object OBJ1 with /* An equality function for struct mem_ref object OBJ1 with
...@@ -1296,7 +1294,7 @@ memref_hash (const void *obj) ...@@ -1296,7 +1294,7 @@ memref_hash (const void *obj)
static int static int
memref_eq (const void *obj1, const void *obj2) memref_eq (const void *obj1, const void *obj2)
{ {
const struct mem_ref *mem1 = obj1; const struct mem_ref *mem1 = (const struct mem_ref *) obj1;
return operand_equal_p (mem1->mem, (tree) obj2, 0); return operand_equal_p (mem1->mem, (tree) obj2, 0);
} }
...@@ -1359,7 +1357,7 @@ gather_mem_refs_stmt (struct loop *loop, htab_t mem_refs, ...@@ -1359,7 +1357,7 @@ gather_mem_refs_stmt (struct loop *loop, htab_t mem_refs,
slot = htab_find_slot_with_hash (mem_refs, *mem, hash, INSERT); slot = htab_find_slot_with_hash (mem_refs, *mem, hash, INSERT);
if (*slot) if (*slot)
ref = *slot; ref = (struct mem_ref *) *slot;
else else
{ {
ref = XNEW (struct mem_ref); ref = XNEW (struct mem_ref);
......
...@@ -634,13 +634,13 @@ bool ...@@ -634,13 +634,13 @@ bool
contains_abnormal_ssa_name_p (tree expr) contains_abnormal_ssa_name_p (tree expr)
{ {
enum tree_code code; enum tree_code code;
enum tree_code_class class; enum tree_code_class codeclass;
if (!expr) if (!expr)
return false; return false;
code = TREE_CODE (expr); code = TREE_CODE (expr);
class = TREE_CODE_CLASS (code); codeclass = TREE_CODE_CLASS (code);
if (code == SSA_NAME) if (code == SSA_NAME)
return SSA_NAME_OCCURS_IN_ABNORMAL_PHI (expr) != 0; return SSA_NAME_OCCURS_IN_ABNORMAL_PHI (expr) != 0;
...@@ -654,7 +654,7 @@ contains_abnormal_ssa_name_p (tree expr) ...@@ -654,7 +654,7 @@ contains_abnormal_ssa_name_p (tree expr)
idx_contains_abnormal_ssa_name_p, idx_contains_abnormal_ssa_name_p,
NULL); NULL);
switch (class) switch (codeclass)
{ {
case tcc_binary: case tcc_binary:
case tcc_comparison: case tcc_comparison:
...@@ -711,7 +711,7 @@ niter_for_exit (struct ivopts_data *data, edge exit) ...@@ -711,7 +711,7 @@ niter_for_exit (struct ivopts_data *data, edge exit)
*pointer_map_insert (data->niters, exit) = niter; *pointer_map_insert (data->niters, exit) = niter;
} }
else else
niter = *slot; niter = (tree) *slot;
return niter; return niter;
} }
...@@ -1295,7 +1295,7 @@ struct ifs_ivopts_data ...@@ -1295,7 +1295,7 @@ struct ifs_ivopts_data
static bool static bool
idx_find_step (tree base, tree *idx, void *data) idx_find_step (tree base, tree *idx, void *data)
{ {
struct ifs_ivopts_data *dta = data; struct ifs_ivopts_data *dta = (struct ifs_ivopts_data *) data;
struct iv *iv; struct iv *iv;
tree step, iv_base, iv_step, lbound, off; tree step, iv_base, iv_step, lbound, off;
struct loop *loop = dta->ivopts_data->current_loop; struct loop *loop = dta->ivopts_data->current_loop;
...@@ -1374,8 +1374,9 @@ idx_find_step (tree base, tree *idx, void *data) ...@@ -1374,8 +1374,9 @@ idx_find_step (tree base, tree *idx, void *data)
static bool static bool
idx_record_use (tree base, tree *idx, idx_record_use (tree base, tree *idx,
void *data) void *vdata)
{ {
struct ivopts_data *data = (struct ivopts_data *) vdata;
find_interesting_uses_op (data, *idx); find_interesting_uses_op (data, *idx);
if (TREE_CODE (base) == ARRAY_REF) if (TREE_CODE (base) == ARRAY_REF)
{ {
...@@ -1905,7 +1906,7 @@ static struct ivopts_data *fd_ivopts_data; ...@@ -1905,7 +1906,7 @@ static struct ivopts_data *fd_ivopts_data;
static tree static tree
find_depends (tree *expr_p, int *ws ATTRIBUTE_UNUSED, void *data) find_depends (tree *expr_p, int *ws ATTRIBUTE_UNUSED, void *data)
{ {
bitmap *depends_on = data; bitmap *depends_on = (bitmap *) data;
struct version_info *info; struct version_info *info;
if (TREE_CODE (*expr_p) != SSA_NAME) if (TREE_CODE (*expr_p) != SSA_NAME)
...@@ -2402,7 +2403,7 @@ prepare_decl_rtl (tree *expr_p, int *ws, void *data) ...@@ -2402,7 +2403,7 @@ prepare_decl_rtl (tree *expr_p, int *ws, void *data)
{ {
tree obj = NULL_TREE; tree obj = NULL_TREE;
rtx x = NULL_RTX; rtx x = NULL_RTX;
int *regno = data; int *regno = (int *) data;
switch (TREE_CODE (*expr_p)) switch (TREE_CODE (*expr_p))
{ {
...@@ -2756,7 +2757,7 @@ struct mbc_entry ...@@ -2756,7 +2757,7 @@ struct mbc_entry
static hashval_t static hashval_t
mbc_entry_hash (const void *entry) mbc_entry_hash (const void *entry)
{ {
const struct mbc_entry *e = entry; const struct mbc_entry *e = (const struct mbc_entry *) entry;
return 57 * (hashval_t) e->mode + (hashval_t) (e->cst % 877); return 57 * (hashval_t) e->mode + (hashval_t) (e->cst % 877);
} }
...@@ -2766,8 +2767,8 @@ mbc_entry_hash (const void *entry) ...@@ -2766,8 +2767,8 @@ mbc_entry_hash (const void *entry)
static int static int
mbc_entry_eq (const void *entry1, const void *entry2) mbc_entry_eq (const void *entry1, const void *entry2)
{ {
const struct mbc_entry *e1 = entry1; const struct mbc_entry *e1 = (const struct mbc_entry *) entry1;
const struct mbc_entry *e2 = entry2; const struct mbc_entry *e2 = (const struct mbc_entry *) entry2;
return (e1->mode == e2->mode return (e1->mode == e2->mode
&& e1->cst == e2->cst); && e1->cst == e2->cst);
......
...@@ -44,7 +44,7 @@ Software Foundation, 51 Franklin Street, Fifth Floor, Boston, MA ...@@ -44,7 +44,7 @@ Software Foundation, 51 Franklin Street, Fifth Floor, Boston, MA
#include "tree-inline.h" #include "tree-inline.h"
#include "gmp.h" #include "gmp.h"
#define SWAP(X, Y) do { void *tmp = (X); (X) = (Y); (Y) = tmp; } while (0) #define SWAP(X, Y) do { affine_iv *tmp = (X); (X) = (Y); (Y) = tmp; } while (0)
/* The maximum number of dominator BBs we search for conditions /* The maximum number of dominator BBs we search for conditions
of loop header copies we use for simplifying a conditional of loop header copies we use for simplifying a conditional
...@@ -1324,7 +1324,7 @@ number_of_iterations_cond (struct loop *loop, ...@@ -1324,7 +1324,7 @@ number_of_iterations_cond (struct loop *loop,
/* Substitute NEW for OLD in EXPR and fold the result. */ /* Substitute NEW for OLD in EXPR and fold the result. */
static tree static tree
simplify_replace_tree (tree expr, tree old, tree new) simplify_replace_tree (tree expr, tree old, tree new_tree)
{ {
unsigned i, n; unsigned i, n;
tree ret = NULL_TREE, e, se; tree ret = NULL_TREE, e, se;
...@@ -1334,7 +1334,7 @@ simplify_replace_tree (tree expr, tree old, tree new) ...@@ -1334,7 +1334,7 @@ simplify_replace_tree (tree expr, tree old, tree new)
if (expr == old if (expr == old
|| operand_equal_p (expr, old, 0)) || operand_equal_p (expr, old, 0))
return unshare_expr (new); return unshare_expr (new_tree);
if (!EXPR_P (expr) && !GIMPLE_STMT_P (expr)) if (!EXPR_P (expr) && !GIMPLE_STMT_P (expr))
return expr; return expr;
...@@ -1343,7 +1343,7 @@ simplify_replace_tree (tree expr, tree old, tree new) ...@@ -1343,7 +1343,7 @@ simplify_replace_tree (tree expr, tree old, tree new)
for (i = 0; i < n; i++) for (i = 0; i < n; i++)
{ {
e = TREE_OPERAND (expr, i); e = TREE_OPERAND (expr, i);
se = simplify_replace_tree (e, old, new); se = simplify_replace_tree (e, old, new_tree);
if (e == se) if (e == se)
continue; continue;
...@@ -2509,7 +2509,7 @@ struct ilb_data ...@@ -2509,7 +2509,7 @@ struct ilb_data
static bool static bool
idx_infer_loop_bounds (tree base, tree *idx, void *dta) idx_infer_loop_bounds (tree base, tree *idx, void *dta)
{ {
struct ilb_data *data = dta; struct ilb_data *data = (struct ilb_data *) dta;
tree ev, init, step; tree ev, init, step;
tree low, high, type, next; tree low, high, type, next;
bool sign, upper = data->reliable, at_end = false; bool sign, upper = data->reliable, at_end = false;
......
...@@ -343,7 +343,7 @@ struct ar_data ...@@ -343,7 +343,7 @@ struct ar_data
static bool static bool
idx_analyze_ref (tree base, tree *index, void *data) idx_analyze_ref (tree base, tree *index, void *data)
{ {
struct ar_data *ar_data = data; struct ar_data *ar_data = (struct ar_data *) data;
tree ibase, step, stepsize; tree ibase, step, stepsize;
HOST_WIDE_INT istep, idelta = 0, imult = 1; HOST_WIDE_INT istep, idelta = 0, imult = 1;
affine_iv iv; affine_iv iv;
......
...@@ -151,7 +151,7 @@ occ_new (basic_block bb, struct occurrence *children) ...@@ -151,7 +151,7 @@ occ_new (basic_block bb, struct occurrence *children)
{ {
struct occurrence *occ; struct occurrence *occ;
occ = bb->aux = pool_alloc (occ_pool); bb->aux = occ = (struct occurrence *) pool_alloc (occ_pool);
memset (occ, 0, sizeof (struct occurrence)); memset (occ, 0, sizeof (struct occurrence));
occ->bb = bb; occ->bb = bb;
......
...@@ -592,13 +592,13 @@ set_virtual_use_link (use_operand_p ptr, tree stmt) ...@@ -592,13 +592,13 @@ set_virtual_use_link (use_operand_p ptr, tree stmt)
static inline def_optype_p static inline def_optype_p
add_def_op (tree *op, def_optype_p last) add_def_op (tree *op, def_optype_p last)
{ {
def_optype_p new; def_optype_p new_def;
new = alloc_def (); new_def = alloc_def ();
DEF_OP_PTR (new) = op; DEF_OP_PTR (new_def) = op;
last->next = new; last->next = new_def;
new->next = NULL; new_def->next = NULL;
return new; return new_def;
} }
...@@ -607,14 +607,14 @@ add_def_op (tree *op, def_optype_p last) ...@@ -607,14 +607,14 @@ add_def_op (tree *op, def_optype_p last)
static inline use_optype_p static inline use_optype_p
add_use_op (tree stmt, tree *op, use_optype_p last) add_use_op (tree stmt, tree *op, use_optype_p last)
{ {
use_optype_p new; use_optype_p new_use;
new = alloc_use (); new_use = alloc_use ();
USE_OP_PTR (new)->use = op; USE_OP_PTR (new_use)->use = op;
link_imm_use_stmt (USE_OP_PTR (new), *op, stmt); link_imm_use_stmt (USE_OP_PTR (new_use), *op, stmt);
last->next = new; last->next = new_use;
new->next = NULL; new_use->next = NULL;
return new; return new_use;
} }
...@@ -625,22 +625,23 @@ add_use_op (tree stmt, tree *op, use_optype_p last) ...@@ -625,22 +625,23 @@ add_use_op (tree stmt, tree *op, use_optype_p last)
static inline voptype_p static inline voptype_p
add_vop (tree stmt, tree op, int num, voptype_p prev) add_vop (tree stmt, tree op, int num, voptype_p prev)
{ {
voptype_p new; voptype_p new_vop;
int x; int x;
new = alloc_vop (num); new_vop = alloc_vop (num);
for (x = 0; x < num; x++) for (x = 0; x < num; x++)
{ {
VUSE_OP_PTR (new, x)->prev = NULL; VUSE_OP_PTR (new_vop, x)->prev = NULL;
SET_VUSE_OP (new, x, op); SET_VUSE_OP (new_vop, x, op);
VUSE_OP_PTR (new, x)->use = &new->usev.uses[x].use_var; VUSE_OP_PTR (new_vop, x)->use = &new_vop->usev.uses[x].use_var;
link_imm_use_stmt (VUSE_OP_PTR (new, x), new->usev.uses[x].use_var, stmt); link_imm_use_stmt (VUSE_OP_PTR (new_vop, x),
new_vop->usev.uses[x].use_var, stmt);
} }
if (prev) if (prev)
prev->next = new; prev->next = new_vop;
new->next = NULL; new_vop->next = NULL;
return new; return new_vop;
} }
...@@ -650,9 +651,9 @@ add_vop (tree stmt, tree op, int num, voptype_p prev) ...@@ -650,9 +651,9 @@ add_vop (tree stmt, tree op, int num, voptype_p prev)
static inline voptype_p static inline voptype_p
add_vuse_op (tree stmt, tree op, int num, voptype_p last) add_vuse_op (tree stmt, tree op, int num, voptype_p last)
{ {
voptype_p new = add_vop (stmt, op, num, last); voptype_p new_vop = add_vop (stmt, op, num, last);
VDEF_RESULT (new) = NULL_TREE; VDEF_RESULT (new_vop) = NULL_TREE;
return new; return new_vop;
} }
...@@ -662,9 +663,9 @@ add_vuse_op (tree stmt, tree op, int num, voptype_p last) ...@@ -662,9 +663,9 @@ add_vuse_op (tree stmt, tree op, int num, voptype_p last)
static inline voptype_p static inline voptype_p
add_vdef_op (tree stmt, tree op, int num, voptype_p last) add_vdef_op (tree stmt, tree op, int num, voptype_p last)
{ {
voptype_p new = add_vop (stmt, op, num, last); voptype_p new_vop = add_vop (stmt, op, num, last);
VDEF_RESULT (new) = op; VDEF_RESULT (new_vop) = op;
return new; return new_vop;
} }
...@@ -2059,7 +2060,7 @@ static void ...@@ -2059,7 +2060,7 @@ static void
get_expr_operands (tree stmt, tree *expr_p, int flags) get_expr_operands (tree stmt, tree *expr_p, int flags)
{ {
enum tree_code code; enum tree_code code;
enum tree_code_class class; enum tree_code_class codeclass;
tree expr = *expr_p; tree expr = *expr_p;
stmt_ann_t s_ann = stmt_ann (stmt); stmt_ann_t s_ann = stmt_ann (stmt);
...@@ -2067,7 +2068,7 @@ get_expr_operands (tree stmt, tree *expr_p, int flags) ...@@ -2067,7 +2068,7 @@ get_expr_operands (tree stmt, tree *expr_p, int flags)
return; return;
code = TREE_CODE (expr); code = TREE_CODE (expr);
class = TREE_CODE_CLASS (code); codeclass = TREE_CODE_CLASS (code);
switch (code) switch (code)
{ {
...@@ -2284,11 +2285,11 @@ get_expr_operands (tree stmt, tree *expr_p, int flags) ...@@ -2284,11 +2285,11 @@ get_expr_operands (tree stmt, tree *expr_p, int flags)
return; return;
default: default:
if (class == tcc_unary) if (codeclass == tcc_unary)
goto do_unary; goto do_unary;
if (class == tcc_binary || class == tcc_comparison) if (codeclass == tcc_binary || codeclass == tcc_comparison)
goto do_binary; goto do_binary;
if (class == tcc_constant || class == tcc_type) if (codeclass == tcc_constant || codeclass == tcc_type)
return; return;
} }
...@@ -2794,7 +2795,7 @@ push_stmt_changes (tree *stmt_p) ...@@ -2794,7 +2795,7 @@ push_stmt_changes (tree *stmt_p)
if (TREE_CODE (stmt) == PHI_NODE) if (TREE_CODE (stmt) == PHI_NODE)
return; return;
buf = xmalloc (sizeof *buf); buf = XNEW (struct scb_d);
memset (buf, 0, sizeof *buf); memset (buf, 0, sizeof *buf);
buf->stmt_p = stmt_p; buf->stmt_p = stmt_p;
......
...@@ -322,14 +322,14 @@ empty_block_p (basic_block bb) ...@@ -322,14 +322,14 @@ empty_block_p (basic_block bb)
static void static void
replace_phi_edge_with_variable (basic_block cond_block, replace_phi_edge_with_variable (basic_block cond_block,
edge e, tree phi, tree new) edge e, tree phi, tree new_tree)
{ {
basic_block bb = bb_for_stmt (phi); basic_block bb = bb_for_stmt (phi);
basic_block block_to_remove; basic_block block_to_remove;
block_stmt_iterator bsi; block_stmt_iterator bsi;
/* Change the PHI argument to new. */ /* Change the PHI argument to new. */
SET_USE (PHI_ARG_DEF_PTR (phi, e->dest_idx), new); SET_USE (PHI_ARG_DEF_PTR (phi, e->dest_idx), new_tree);
/* Remove the empty basic block. */ /* Remove the empty basic block. */
if (EDGE_SUCC (cond_block, 0)->dest == bb) if (EDGE_SUCC (cond_block, 0)->dest == bb)
...@@ -377,7 +377,7 @@ conditional_replacement (basic_block cond_bb, basic_block middle_bb, ...@@ -377,7 +377,7 @@ conditional_replacement (basic_block cond_bb, basic_block middle_bb,
{ {
tree result; tree result;
tree old_result = NULL; tree old_result = NULL;
tree new, cond; tree new_stmt, cond;
block_stmt_iterator bsi; block_stmt_iterator bsi;
edge true_edge, false_edge; edge true_edge, false_edge;
tree new_var = NULL; tree new_var = NULL;
...@@ -470,7 +470,7 @@ conditional_replacement (basic_block cond_bb, basic_block middle_bb, ...@@ -470,7 +470,7 @@ conditional_replacement (basic_block cond_bb, basic_block middle_bb,
|| (e1 == true_edge && integer_onep (arg1)) || (e1 == true_edge && integer_onep (arg1))
|| (e1 == false_edge && integer_zerop (arg1))) || (e1 == false_edge && integer_zerop (arg1)))
{ {
new = build_gimple_modify_stmt (new_var1, cond); new_stmt = build_gimple_modify_stmt (new_var1, cond);
} }
else else
{ {
...@@ -514,19 +514,19 @@ conditional_replacement (basic_block cond_bb, basic_block middle_bb, ...@@ -514,19 +514,19 @@ conditional_replacement (basic_block cond_bb, basic_block middle_bb,
tmp = create_tmp_var (TREE_TYPE (op0), NULL); tmp = create_tmp_var (TREE_TYPE (op0), NULL);
add_referenced_var (tmp); add_referenced_var (tmp);
cond_tmp = make_ssa_name (tmp, NULL); cond_tmp = make_ssa_name (tmp, NULL);
new = build_gimple_modify_stmt (cond_tmp, op0); new_stmt = build_gimple_modify_stmt (cond_tmp, op0);
SSA_NAME_DEF_STMT (cond_tmp) = new; SSA_NAME_DEF_STMT (cond_tmp) = new_stmt;
bsi_insert_after (&bsi, new, BSI_NEW_STMT); bsi_insert_after (&bsi, new_stmt, BSI_NEW_STMT);
cond = fold_convert (TREE_TYPE (result), cond_tmp); cond = fold_convert (TREE_TYPE (result), cond_tmp);
} }
new = build_gimple_modify_stmt (new_var1, cond); new_stmt = build_gimple_modify_stmt (new_var1, cond);
} }
bsi_insert_after (&bsi, new, BSI_NEW_STMT); bsi_insert_after (&bsi, new_stmt, BSI_NEW_STMT);
SSA_NAME_DEF_STMT (new_var1) = new; SSA_NAME_DEF_STMT (new_var1) = new_stmt;
replace_phi_edge_with_variable (cond_bb, e1, phi, new_var1); replace_phi_edge_with_variable (cond_bb, e1, phi, new_var1);
...@@ -624,7 +624,7 @@ minmax_replacement (basic_block cond_bb, basic_block middle_bb, ...@@ -624,7 +624,7 @@ minmax_replacement (basic_block cond_bb, basic_block middle_bb,
tree arg0, tree arg1) tree arg0, tree arg1)
{ {
tree result, type; tree result, type;
tree cond, new; tree cond, new_stmt;
edge true_edge, false_edge; edge true_edge, false_edge;
enum tree_code cmp, minmax, ass_code; enum tree_code cmp, minmax, ass_code;
tree smaller, larger, arg_true, arg_false; tree smaller, larger, arg_true, arg_false;
...@@ -853,10 +853,10 @@ minmax_replacement (basic_block cond_bb, basic_block middle_bb, ...@@ -853,10 +853,10 @@ minmax_replacement (basic_block cond_bb, basic_block middle_bb,
/* Emit the statement to compute min/max. */ /* Emit the statement to compute min/max. */
result = duplicate_ssa_name (PHI_RESULT (phi), NULL); result = duplicate_ssa_name (PHI_RESULT (phi), NULL);
new = build_gimple_modify_stmt (result, build2 (minmax, type, arg0, arg1)); new_stmt = build_gimple_modify_stmt (result, build2 (minmax, type, arg0, arg1));
SSA_NAME_DEF_STMT (result) = new; SSA_NAME_DEF_STMT (result) = new_stmt;
bsi = bsi_last (cond_bb); bsi = bsi_last (cond_bb);
bsi_insert_before (&bsi, new, BSI_NEW_STMT); bsi_insert_before (&bsi, new_stmt, BSI_NEW_STMT);
replace_phi_edge_with_variable (cond_bb, e1, phi, result); replace_phi_edge_with_variable (cond_bb, e1, phi, result);
return true; return true;
...@@ -874,7 +874,7 @@ abs_replacement (basic_block cond_bb, basic_block middle_bb, ...@@ -874,7 +874,7 @@ abs_replacement (basic_block cond_bb, basic_block middle_bb,
tree phi, tree arg0, tree arg1) tree phi, tree arg0, tree arg1)
{ {
tree result; tree result;
tree new, cond; tree new_stmt, cond;
block_stmt_iterator bsi; block_stmt_iterator bsi;
edge true_edge, false_edge; edge true_edge, false_edge;
tree assign; tree assign;
...@@ -965,24 +965,24 @@ abs_replacement (basic_block cond_bb, basic_block middle_bb, ...@@ -965,24 +965,24 @@ abs_replacement (basic_block cond_bb, basic_block middle_bb,
lhs = result; lhs = result;
/* Build the modify expression with abs expression. */ /* Build the modify expression with abs expression. */
new = build_gimple_modify_stmt (lhs, new_stmt = build_gimple_modify_stmt (lhs,
build1 (ABS_EXPR, TREE_TYPE (lhs), rhs)); build1 (ABS_EXPR, TREE_TYPE (lhs), rhs));
SSA_NAME_DEF_STMT (lhs) = new; SSA_NAME_DEF_STMT (lhs) = new_stmt;
bsi = bsi_last (cond_bb); bsi = bsi_last (cond_bb);
bsi_insert_before (&bsi, new, BSI_NEW_STMT); bsi_insert_before (&bsi, new_stmt, BSI_NEW_STMT);
if (negate) if (negate)
{ {
/* Get the right BSI. We want to insert after the recently /* Get the right BSI. We want to insert after the recently
added ABS_EXPR statement (which we know is the first statement added ABS_EXPR statement (which we know is the first statement
in the block. */ in the block. */
new = build_gimple_modify_stmt (result, new_stmt = build_gimple_modify_stmt (result,
build1 (NEGATE_EXPR, TREE_TYPE (lhs), build1 (NEGATE_EXPR, TREE_TYPE (lhs),
lhs)); lhs));
SSA_NAME_DEF_STMT (result) = new; SSA_NAME_DEF_STMT (result) = new_stmt;
bsi_insert_after (&bsi, new, BSI_NEW_STMT); bsi_insert_after (&bsi, new_stmt, BSI_NEW_STMT);
} }
replace_phi_edge_with_variable (cond_bb, e1, phi, result); replace_phi_edge_with_variable (cond_bb, e1, phi, result);
......
...@@ -2290,7 +2290,7 @@ create_expression_by_pieces (basic_block block, tree expr, tree stmts) ...@@ -2290,7 +2290,7 @@ create_expression_by_pieces (basic_block block, tree expr, tree stmts)
genfn = find_or_generate_expression (block, fn, stmts); genfn = find_or_generate_expression (block, fn, stmts);
nargs = call_expr_nargs (expr); nargs = call_expr_nargs (expr);
buffer = alloca (nargs * sizeof (tree)); buffer = (tree*) alloca (nargs * sizeof (tree));
for (i = 0; i < nargs; i++) for (i = 0; i < nargs; i++)
{ {
...@@ -3196,7 +3196,7 @@ insert_fake_stores (void) ...@@ -3196,7 +3196,7 @@ insert_fake_stores (void)
def_operand_p defp; def_operand_p defp;
tree lhs = GIMPLE_STMT_OPERAND (stmt, 0); tree lhs = GIMPLE_STMT_OPERAND (stmt, 0);
tree rhs = GIMPLE_STMT_OPERAND (stmt, 1); tree rhs = GIMPLE_STMT_OPERAND (stmt, 1);
tree new; tree new_tree;
bool notokay = false; bool notokay = false;
FOR_EACH_SSA_DEF_OPERAND (defp, stmt, iter, SSA_OP_VIRTUAL_DEFS) FOR_EACH_SSA_DEF_OPERAND (defp, stmt, iter, SSA_OP_VIRTUAL_DEFS)
...@@ -3220,16 +3220,16 @@ insert_fake_stores (void) ...@@ -3220,16 +3220,16 @@ insert_fake_stores (void)
get_var_ann (storetemp); get_var_ann (storetemp);
} }
new = poolify_modify_stmt (storetemp, lhs); new_tree = poolify_modify_stmt (storetemp, lhs);
lhs = make_ssa_name (storetemp, new); lhs = make_ssa_name (storetemp, new_tree);
GIMPLE_STMT_OPERAND (new, 0) = lhs; GIMPLE_STMT_OPERAND (new_tree, 0) = lhs;
create_ssa_artificial_load_stmt (new, stmt); create_ssa_artificial_load_stmt (new_tree, stmt);
NECESSARY (new) = 0; NECESSARY (new_tree) = 0;
VEC_safe_push (tree, heap, inserted_exprs, new); VEC_safe_push (tree, heap, inserted_exprs, new_tree);
VEC_safe_push (tree, heap, need_creation, new); VEC_safe_push (tree, heap, need_creation, new_tree);
bsi_insert_after (&bsi, new, BSI_NEW_STMT); bsi_insert_after (&bsi, new_tree, BSI_NEW_STMT);
} }
} }
} }
......
...@@ -337,7 +337,7 @@ sort_by_operand_rank (const void *pa, const void *pb) ...@@ -337,7 +337,7 @@ sort_by_operand_rank (const void *pa, const void *pb)
static void static void
add_to_ops_vec (VEC(operand_entry_t, heap) **ops, tree op) add_to_ops_vec (VEC(operand_entry_t, heap) **ops, tree op)
{ {
operand_entry_t oe = pool_alloc (operand_entry_pool); operand_entry_t oe = (operand_entry_t) pool_alloc (operand_entry_pool);
oe->op = op; oe->op = op;
oe->rank = get_rank (op); oe->rank = get_rank (op);
......
...@@ -328,7 +328,8 @@ heapvar_lookup (tree from) ...@@ -328,7 +328,8 @@ heapvar_lookup (tree from)
struct tree_map *h, in; struct tree_map *h, in;
in.base.from = from; in.base.from = from;
h = htab_find_with_hash (heapvar_for_stmt, &in, htab_hash_pointer (from)); h = (struct tree_map *) htab_find_with_hash (heapvar_for_stmt, &in,
htab_hash_pointer (from));
if (h) if (h)
return h->to; return h->to;
return NULL_TREE; return NULL_TREE;
...@@ -343,7 +344,7 @@ heapvar_insert (tree from, tree to) ...@@ -343,7 +344,7 @@ heapvar_insert (tree from, tree to)
struct tree_map *h; struct tree_map *h;
void **loc; void **loc;
h = ggc_alloc (sizeof (struct tree_map)); h = GGC_NEW (struct tree_map);
h->hash = htab_hash_pointer (from); h->hash = htab_hash_pointer (from);
h->base.from = from; h->base.from = from;
h->to = to; h->to = to;
...@@ -357,7 +358,7 @@ heapvar_insert (tree from, tree to) ...@@ -357,7 +358,7 @@ heapvar_insert (tree from, tree to)
static varinfo_t static varinfo_t
new_var_info (tree t, unsigned int id, const char *name) new_var_info (tree t, unsigned int id, const char *name)
{ {
varinfo_t ret = pool_alloc (variable_info_pool); varinfo_t ret = (varinfo_t) pool_alloc (variable_info_pool);
ret->id = id; ret->id = id;
ret->name = name; ret->name = name;
...@@ -513,7 +514,7 @@ static constraint_t ...@@ -513,7 +514,7 @@ static constraint_t
new_constraint (const struct constraint_expr lhs, new_constraint (const struct constraint_expr lhs,
const struct constraint_expr rhs) const struct constraint_expr rhs)
{ {
constraint_t ret = pool_alloc (constraint_pool); constraint_t ret = (constraint_t) pool_alloc (constraint_pool);
ret->lhs = lhs; ret->lhs = lhs;
ret->rhs = rhs; ret->rhs = rhs;
return ret; return ret;
...@@ -4762,7 +4763,7 @@ remove_preds_and_fake_succs (constraint_graph_t graph) ...@@ -4762,7 +4763,7 @@ remove_preds_and_fake_succs (constraint_graph_t graph)
/* Now reallocate the size of the successor list as, and blow away /* Now reallocate the size of the successor list as, and blow away
the predecessor bitmaps. */ the predecessor bitmaps. */
graph->size = VEC_length (varinfo_t, varmap); graph->size = VEC_length (varinfo_t, varmap);
graph->succs = xrealloc (graph->succs, graph->size * sizeof (bitmap)); graph->succs = XRESIZEVEC (bitmap, graph->succs, graph->size);
free (graph->implicit_preds); free (graph->implicit_preds);
graph->implicit_preds = NULL; graph->implicit_preds = NULL;
......
...@@ -533,7 +533,7 @@ thread_block (basic_block bb, bool noloop_only) ...@@ -533,7 +533,7 @@ thread_block (basic_block bb, bool noloop_only)
if (loop->header == bb) if (loop->header == bb)
{ {
e = loop_latch_edge (loop); e = loop_latch_edge (loop);
e2 = e->aux; e2 = (edge) e->aux;
if (e2 && loop_exit_edge_p (loop, e2)) if (e2 && loop_exit_edge_p (loop, e2))
{ {
...@@ -546,7 +546,7 @@ thread_block (basic_block bb, bool noloop_only) ...@@ -546,7 +546,7 @@ thread_block (basic_block bb, bool noloop_only)
efficient lookups. */ efficient lookups. */
FOR_EACH_EDGE (e, ei, bb->preds) FOR_EACH_EDGE (e, ei, bb->preds)
{ {
e2 = e->aux; e2 = (edge) e->aux;
if (!e2 if (!e2
/* If NOLOOP_ONLY is true, we only allow threading through the /* If NOLOOP_ONLY is true, we only allow threading through the
...@@ -560,7 +560,7 @@ thread_block (basic_block bb, bool noloop_only) ...@@ -560,7 +560,7 @@ thread_block (basic_block bb, bool noloop_only)
} }
update_bb_profile_for_threading (e->dest, EDGE_FREQUENCY (e), update_bb_profile_for_threading (e->dest, EDGE_FREQUENCY (e),
e->count, e->aux); e->count, (edge) e->aux);
/* Insert the outgoing edge into the hash table if it is not /* Insert the outgoing edge into the hash table if it is not
already in the hash table. */ already in the hash table. */
...@@ -573,7 +573,7 @@ thread_block (basic_block bb, bool noloop_only) ...@@ -573,7 +573,7 @@ thread_block (basic_block bb, bool noloop_only)
DO_NOT_DUPLICATE attribute. */ DO_NOT_DUPLICATE attribute. */
if (all) if (all)
{ {
edge e = EDGE_PRED (bb, 0)->aux; edge e = (edge) EDGE_PRED (bb, 0)->aux;
lookup_redirection_data (e, NULL, NO_INSERT)->do_not_duplicate = true; lookup_redirection_data (e, NULL, NO_INSERT)->do_not_duplicate = true;
} }
...@@ -623,7 +623,7 @@ static basic_block ...@@ -623,7 +623,7 @@ static basic_block
thread_single_edge (edge e) thread_single_edge (edge e)
{ {
basic_block bb = e->dest; basic_block bb = e->dest;
edge eto = e->aux; edge eto = (edge) e->aux;
struct redirection_data rd; struct redirection_data rd;
struct local_info local_info; struct local_info local_info;
...@@ -822,7 +822,7 @@ thread_through_loop_header (struct loop *loop, bool may_peel_loop_headers) ...@@ -822,7 +822,7 @@ thread_through_loop_header (struct loop *loop, bool may_peel_loop_headers)
if (latch->aux) if (latch->aux)
{ {
tgt_edge = latch->aux; tgt_edge = (edge) latch->aux;
tgt_bb = tgt_edge->dest; tgt_bb = tgt_edge->dest;
} }
else if (!may_peel_loop_headers else if (!may_peel_loop_headers
...@@ -845,7 +845,7 @@ thread_through_loop_header (struct loop *loop, bool may_peel_loop_headers) ...@@ -845,7 +845,7 @@ thread_through_loop_header (struct loop *loop, bool may_peel_loop_headers)
goto fail; goto fail;
} }
tgt_edge = e->aux; tgt_edge = (edge) e->aux;
atgt_bb = tgt_edge->dest; atgt_bb = tgt_edge->dest;
if (!tgt_bb) if (!tgt_bb)
tgt_bb = atgt_bb; tgt_bb = atgt_bb;
......
...@@ -799,7 +799,7 @@ var_ann_hash (const void *item) ...@@ -799,7 +799,7 @@ var_ann_hash (const void *item)
void void
init_tree_ssa (void) init_tree_ssa (void)
{ {
cfun->gimple_df = ggc_alloc_cleared (sizeof (struct gimple_df)); cfun->gimple_df = GGC_CNEW (struct gimple_df);
cfun->gimple_df->referenced_vars = htab_create_ggc (20, int_tree_map_hash, cfun->gimple_df->referenced_vars = htab_create_ggc (20, int_tree_map_hash,
int_tree_map_eq, NULL); int_tree_map_eq, NULL);
cfun->gimple_df->default_defs = htab_create_ggc (20, int_tree_map_hash, cfun->gimple_df->default_defs = htab_create_ggc (20, int_tree_map_hash,
......
...@@ -266,7 +266,7 @@ duplicate_ssa_name_ptr_info (tree name, struct ptr_info_def *ptr_info) ...@@ -266,7 +266,7 @@ duplicate_ssa_name_ptr_info (tree name, struct ptr_info_def *ptr_info)
if (!ptr_info) if (!ptr_info)
return; return;
new_ptr_info = ggc_alloc (sizeof (struct ptr_info_def)); new_ptr_info = GGC_NEW (struct ptr_info_def);
*new_ptr_info = *ptr_info; *new_ptr_info = *ptr_info;
if (ptr_info->pt_vars) if (ptr_info->pt_vars)
......
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