diff options
author | rakdver <rakdver@138bc75d-0d04-0410-961f-82ee72b054a4> | 2004-09-26 19:53:13 +0000 |
---|---|---|
committer | rakdver <rakdver@138bc75d-0d04-0410-961f-82ee72b054a4> | 2004-09-26 19:53:13 +0000 |
commit | 0cc4271a0f43fa0d3e4b3b728a3c103d39e305cd (patch) | |
tree | 5a3c9bcba3d78b6ee1c1f3cb79e280b227446aa2 /gcc/tree-ssa-alias.c | |
parent | 321c1598d3c14de50c9ff1966da91b4003fbf719 (diff) | |
download | ppe42-gcc-0cc4271a0f43fa0d3e4b3b728a3c103d39e305cd.tar.gz ppe42-gcc-0cc4271a0f43fa0d3e4b3b728a3c103d39e305cd.zip |
* bitmap.h (EXECUTE_IF_SET_IN_BITMAP, EXECUTE_IF_AND_COMPL_IN_BITMAP,
EXECUTE_IF_AND_IN_BITMAP): Changed to iterator style.
(bitmap_iterator): New type.
(bmp_iter_common_next_1, bmp_iter_single_next_1, bmp_iter_single_init,
bmp_iter_end_p, bmp_iter_single_next, bmp_iter_and_not_next_1,
bmp_iter_and_not_init, bmp_iter_and_not_next, bmp_iter_and_next_1,
bmp_iter_and_init, bmp_iter_and_next): New functions.
* basic-block.h (EXECUTE_IF_SET_IN_REG_SET,
EXECUTE_IF_AND_COMPL_IN_REG_SET, EXECUTE_IF_AND_IN_REG_SET): Changed to
use iterator-style EXECUTE_IF_IN_BITMAP macros.
* bitmap.c (bitmap_print): Ditto.
* bt-load.c (clear_btr_from_live_range, add_btr_to_live_range,
btr_def_live_range): Ditto.
* cfganal.c (compute_dominance_frontiers_1) Ditto.
* cgraphunit.c (convert_UIDs_in_bitmap, cgraph_characterize_statics):
Ditto.
* ddg.c (build_inter_loop_deps): Ditto.
* df.c (FOR_EACH_BB_IN_BITMAP, df_bb_reg_info_compute, df_refs_update):
Ditto.
* except.c (remove_eh_handler): Ditto.
* flow.c (reg_set_to_hard_reg_set): Ditto.
* gcse.c (clear_modify_mem_tables): Ditto.
* global.c (build_insn_chain): Ditto.
* ifcvt.c (dead_or_predicable): Ditto.
* loop-invariant.c (get_inv_cost, set_move_mark, move_invariant_reg):
Ditto.
* ra-build.c (livethrough_conflicts_bb, conflicts_between_webs): Ditto.
* ra-rewrite.c (reloads_to_loads, rewrite_program2,
detect_web_parts_to_rebuild, delete_useless_defs, actual_spill): Ditto.
* tree-cfg.c (allocate_ssa_names, tree_duplicate_sese_region,
tree_purge_all_dead_eh_edges): Ditto.
* tree-into-ssa.c (compute_global_livein, insert_phi_nodes,
insert_phi_nodes_for, debug_def_blocks_r, invalidate_name_tags,
rewrite_ssa_into_ssa): Ditto.
* tree-outof-ssa.c (find_replaceable_exprs): Ditto.
* tree-sra.c (scan_function, decide_instantiations, scalarize_parms):
Ditto.
* tree-ssa-alias.c (init_alias_info, compute_points_to_and_addr_escape,
compute_flow_sensitive_aliasing, maybe_create_global_var,
dump_points_to_info_for): Ditto.
* tree-ssa-dce.c (EXECUTE_IF_CONTROL_DEPENDENT): Ditto.
* tree-ssa-dse.c (dse_finalize_block): Ditto.
* tree-ssa-live.c (live_worklist, calculate_live_on_entry,
calculate_live_on_exit, build_tree_conflict_graph, dump_live_info):
Ditto.
* tree-ssa-loop-ivopts.c (find_induction_variables,
find_interesting_uses, add_old_ivs_candidates, alloc_use_cost_map,
determine_use_iv_costs, determine_set_costs, find_best_candidate,
set_cost_up_to, create_new_ivs, remove_unused_ivs, free_loop_data):
Ditto.
* tree-ssa-loop-manip.c (add_exit_phis_var, add_exit_phis): Ditto.
* tree-ssa-operands.c (get_asm_expr_operands, add_call_clobber_ops,
add_call_read_ops): Ditto.
* tree-ssa-pre.c (bitmap_print_value_set, insert_aux): Ditto.
git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/trunk@88145 138bc75d-0d04-0410-961f-82ee72b054a4
Diffstat (limited to 'gcc/tree-ssa-alias.c')
-rw-r--r-- | gcc/tree-ssa-alias.c | 64 |
1 files changed, 38 insertions, 26 deletions
diff --git a/gcc/tree-ssa-alias.c b/gcc/tree-ssa-alias.c index b0cdddce968..883c53d935e 100644 --- a/gcc/tree-ssa-alias.c +++ b/gcc/tree-ssa-alias.c @@ -382,10 +382,11 @@ init_alias_info (void) if (aliases_computed_p) { size_t i; + bitmap_iterator bi; /* Clear the call-clobbered set. We are going to re-discover call-clobbered variables. */ - EXECUTE_IF_SET_IN_BITMAP (call_clobbered_vars, 0, i, + EXECUTE_IF_SET_IN_BITMAP (call_clobbered_vars, 0, i, bi) { tree var = referenced_var (i); @@ -394,7 +395,7 @@ init_alias_info (void) code, so we can't remove them from CALL_CLOBBERED_VARS. */ if (!is_call_clobbered (var)) bitmap_clear_bit (call_clobbered_vars, var_ann (var)->uid); - }); + } /* Similarly, clear the set of addressable variables. In this case, we can just clear the set because addressability is @@ -589,6 +590,7 @@ compute_points_to_and_addr_escape (struct alias_info *ai) bitmap addr_taken; tree stmt = bsi_stmt (si); bool stmt_escapes_p = is_escape_site (stmt, &ai->num_calls_found); + bitmap_iterator bi; /* Mark all the variables whose address are taken by the statement. Note that this will miss all the addresses taken @@ -597,13 +599,13 @@ compute_points_to_and_addr_escape (struct alias_info *ai) get_stmt_operands (stmt); addr_taken = addresses_taken (stmt); if (addr_taken) - EXECUTE_IF_SET_IN_BITMAP (addr_taken, 0, i, - { - tree var = referenced_var (i); - bitmap_set_bit (ai->addresses_needed, var_ann (var)->uid); - if (stmt_escapes_p) - mark_call_clobbered (var); - }); + EXECUTE_IF_SET_IN_BITMAP (addr_taken, 0, i, bi) + { + tree var = referenced_var (i); + bitmap_set_bit (ai->addresses_needed, var_ann (var)->uid); + if (stmt_escapes_p) + mark_call_clobbered (var); + } if (stmt_escapes_p) block_ann->has_escape_site = 1; @@ -618,11 +620,11 @@ compute_points_to_and_addr_escape (struct alias_info *ai) if (addr_taken && TREE_CODE (stmt) == MODIFY_EXPR && !POINTER_TYPE_P (TREE_TYPE (TREE_OPERAND (stmt, 0)))) - EXECUTE_IF_SET_IN_BITMAP (addr_taken, 0, i, - { - tree var = referenced_var (i); - mark_call_clobbered (var); - }); + EXECUTE_IF_SET_IN_BITMAP (addr_taken, 0, i, bi) + { + tree var = referenced_var (i); + mark_call_clobbered (var); + } FOR_EACH_SSA_TREE_OPERAND (op, stmt, iter, SSA_OP_USE) { @@ -835,6 +837,7 @@ compute_flow_sensitive_aliasing (struct alias_info *ai) tree ptr = VARRAY_TREE (ai->processed_ptrs, i); struct ptr_info_def *pi = SSA_NAME_PTR_INFO (ptr); var_ann_t v_ann = var_ann (SSA_NAME_VAR (ptr)); + bitmap_iterator bi; if (pi->value_escapes_p || pi->pt_anything) { @@ -847,16 +850,20 @@ compute_flow_sensitive_aliasing (struct alias_info *ai) mark_call_clobbered (v_ann->type_mem_tag); if (pi->pt_vars) - EXECUTE_IF_SET_IN_BITMAP (pi->pt_vars, 0, j, - mark_call_clobbered (referenced_var (j))); + EXECUTE_IF_SET_IN_BITMAP (pi->pt_vars, 0, j, bi) + { + mark_call_clobbered (referenced_var (j)); + } } /* Set up aliasing information for PTR's name memory tag (if it has one). Note that only pointers that have been dereferenced will have a name memory tag. */ if (pi->name_mem_tag && pi->pt_vars) - EXECUTE_IF_SET_IN_BITMAP (pi->pt_vars, 0, j, - add_may_alias (pi->name_mem_tag, referenced_var (j))); + EXECUTE_IF_SET_IN_BITMAP (pi->pt_vars, 0, j, bi) + { + add_may_alias (pi->name_mem_tag, referenced_var (j)); + } /* If the name tag is call clobbered, so is the type tag associated with the base VAR_DECL. */ @@ -1476,13 +1483,17 @@ static void maybe_create_global_var (struct alias_info *ai) { size_t i, n_clobbered; + bitmap_iterator bi; /* No need to create it, if we have one already. */ if (global_var == NULL_TREE) { /* Count all the call-clobbered variables. */ n_clobbered = 0; - EXECUTE_IF_SET_IN_BITMAP (call_clobbered_vars, 0, i, n_clobbered++); + EXECUTE_IF_SET_IN_BITMAP (call_clobbered_vars, 0, i, bi) + { + n_clobbered++; + } /* Create .GLOBAL_VAR if we have too many call-clobbered variables. We also create .GLOBAL_VAR when there no @@ -1510,7 +1521,7 @@ maybe_create_global_var (struct alias_info *ai) /* If the function has calls to clobbering functions and .GLOBAL_VAR has been created, make it an alias for all call-clobbered variables. */ if (global_var) - EXECUTE_IF_SET_IN_BITMAP (call_clobbered_vars, 0, i, + EXECUTE_IF_SET_IN_BITMAP (call_clobbered_vars, 0, i, bi) { tree var = referenced_var (i); if (var != global_var) @@ -1518,7 +1529,7 @@ maybe_create_global_var (struct alias_info *ai) add_may_alias (var, global_var); bitmap_set_bit (vars_to_rename, var_ann (var)->uid); } - }); + } } @@ -2315,13 +2326,14 @@ dump_points_to_info_for (FILE *file, tree ptr) if (pi->pt_vars) { unsigned ix; + bitmap_iterator bi; fprintf (file, ", points-to vars: { "); - EXECUTE_IF_SET_IN_BITMAP (pi->pt_vars, 0, ix, - { - print_generic_expr (file, referenced_var (ix), dump_flags); - fprintf (file, " "); - }); + EXECUTE_IF_SET_IN_BITMAP (pi->pt_vars, 0, ix, bi) + { + print_generic_expr (file, referenced_var (ix), dump_flags); + fprintf (file, " "); + } fprintf (file, "}"); } } |