diff options
author | Richard Guenther <rguenther@suse.de> | 2008-02-25 21:20:34 +0000 |
---|---|---|
committer | Richard Biener <rguenth@gcc.gnu.org> | 2008-02-25 21:20:34 +0000 |
commit | 381a258b1e19d638ff442130bf59a1a26fb2212e (patch) | |
tree | 8266407752dab136d0fc9a405ebbc3aca2e08f48 /gcc/tree-ssa-structalias.c | |
parent | 8dd07840af477dc858b5a8117bf10679e7fbf819 (diff) | |
download | gcc-381a258b1e19d638ff442130bf59a1a26fb2212e.tar.gz |
revert: tree-flow.h (uid_decl_map_hash, [...]): Move ...
2008-02-25 Richard Guenther <rguenther@suse.de>
Revert:
2008-02-25 Richard Guenther <rguenther@suse.de>
* tree-flow.h (uid_decl_map_hash, uid_decl_map_eq): Move ...
* tree.h (uid_decl_map_hash, uid_decl_map_eq): ... here.
(lookup_decl_from_uid): Declare.
* tree-ssa.c (uid_decl_map_eq, uid_decl_map_hash): Move ...
* tree.c (uid_decl_map_eq, uid_decl_map_hash): ... here.
(decl_for_uid_map): New global hashtable mapping DECL_UID
to the decl tree.
(init_ttree): Allocate it.
(insert_decl_to_uid_decl_map): New helper function.
(make_node_stat): Insert new decls into the map.
(copy_node_stat): Likewise.
(lookup_decl_from_uid): New function.
(print_decl_for_uid_map_statistics): New helper.
(dump_tree_statistics): Call it.
* tree-flow.h (struct gimple_df): Make referenced_vars a bitmap.
(referenced_var_iterator): Adjust.
(FOR_EACH_REFERENCED_VAR): Adjust.
(FOR_EACH_REFERENCED_VAR_IN_BITMAP): New iterator.
(num_referenced_vars): Adjust.
* tree-flow-inline.h (gimple_referenced_vars): Adjust.
(first_referenced_var): Remove.
(end_referenced_vars_p): Likewise.
(next_referenced_var): Likewise.
(referenced_var_iterator_set): New helper function.
* tree-dfa.c (referenced_var_lookup): Adjust.
(referenced_var_check_and_insert): Likewise.
(remove_referenced_var): Likewise.
* tree-ssa.c (verify_flow_insensitive_alias_info): Use
FOR_EACH_REFERENCED_VAR_IN_BITMAP.
(verify_call_clobbering): Likewise.
(verify_memory_partitions): Likewise.
(init_tree_ssa): Allocate bitmap instead of hashtable for
referenced_vars.
(delete_tree_ssa): Adjust.
* tree-ssa-alias.c (mark_aliases_call_clobbered): Use
FOR_EACH_REFERENCED_VAR_IN_BITMAP.
(compute_tag_properties): Likewise.
(set_initial_properties): Likewise.
(find_partition_for): Likewise.
(update_reference_counts): Likewise.
(dump_may_aliases_for): Likewise.
* tree-ssa-operands.c (add_virtual_operand): Likewise.
(add_call_clobber_ops): Likewise.
(add_call_read_ops): Likewise.
(get_asm_expr_operands): Likewise.
* tree-into-ssa.c (dump_decl_set): Likewise.
(update_ssa): Likewise.
* tree-sra.c (scan_function): Likewise.
(decide_instantiations): Likewise.
(scalarize_parms): Likewise.
* tree-ssa-alias-warnings.c (build_reference_table): Likewise.
(dsa_named_for): Likewise.
* tree-ssa-structalias.c (update_alias_info): Likewise.
(merge_smts_into): Likewise.
From-SVN: r132643
Diffstat (limited to 'gcc/tree-ssa-structalias.c')
-rw-r--r-- | gcc/tree-ssa-structalias.c | 27 |
1 files changed, 15 insertions, 12 deletions
diff --git a/gcc/tree-ssa-structalias.c b/gcc/tree-ssa-structalias.c index 66f086c0c15..70a9d3212c6 100644 --- a/gcc/tree-ssa-structalias.c +++ b/gcc/tree-ssa-structalias.c @@ -3313,11 +3313,12 @@ update_alias_info (tree stmt, struct alias_info *ai) call-clobbered. */ if (stmt_escape_type != NO_ESCAPE) { - referenced_var_iterator ri; - tree rvar; + bitmap_iterator bi; + unsigned i; - FOR_EACH_REFERENCED_VAR_IN_BITMAP (addr_taken, rvar, ri) + EXECUTE_IF_SET_IN_BITMAP (addr_taken, 0, i, bi) { + tree rvar = referenced_var (i); if (!unmodifiable_var_p (rvar)) mark_call_clobbered (rvar, stmt_escape_type); } @@ -3475,8 +3476,8 @@ update_alias_info (tree stmt, struct alias_info *ai) memory reference stats for all memory symbols referenced by STMT. */ if (stmt_references_memory_p (stmt)) { - referenced_var_iterator ri; - tree sym; + unsigned i; + bitmap_iterator bi; mem_ref_stats->num_mem_stmts++; @@ -3503,8 +3504,9 @@ update_alias_info (tree stmt, struct alias_info *ai) memory symbols in its argument list, but these cases do not occur so frequently as to constitute a serious problem. */ if (STORED_SYMS (stmt)) - FOR_EACH_REFERENCED_VAR_IN_BITMAP (STORED_SYMS (stmt), sym, ri) + EXECUTE_IF_SET_IN_BITMAP (STORED_SYMS (stmt), 0, i, bi) { + tree sym = referenced_var (i); pointer_set_insert (ai->written_vars, sym); if (!stmt_dereferences_ptr_p && stmt_escape_type != ESCAPE_TO_CALL @@ -3518,8 +3520,8 @@ update_alias_info (tree stmt, struct alias_info *ai) && stmt_escape_type != ESCAPE_TO_CALL && stmt_escape_type != ESCAPE_TO_PURE_CONST && stmt_escape_type != ESCAPE_TO_ASM) - FOR_EACH_REFERENCED_VAR_IN_BITMAP (LOADED_SYMS (stmt), sym, ri) - update_mem_sym_stats_from_stmt (sym, stmt, 1, 0); + EXECUTE_IF_SET_IN_BITMAP (LOADED_SYMS (stmt), 0, i, bi) + update_mem_sym_stats_from_stmt (referenced_var (i), stmt, 1, 0); } } @@ -4879,6 +4881,8 @@ set_used_smts (void) static void merge_smts_into (tree p, bitmap solution) { + unsigned int i; + bitmap_iterator bi; tree smt; bitmap aliases; tree var = p; @@ -4890,19 +4894,18 @@ merge_smts_into (tree p, bitmap solution) if (smt) { alias_set_type smtset = get_alias_set (TREE_TYPE (smt)); - referenced_var_iterator ri; - tree newsmt; /* Need to set the SMT subsets first before this will work properly. */ bitmap_set_bit (solution, DECL_UID (smt)); - FOR_EACH_REFERENCED_VAR_IN_BITMAP (used_smts, newsmt, ri) + EXECUTE_IF_SET_IN_BITMAP (used_smts, 0, i, bi) { + tree newsmt = referenced_var (i); tree newsmttype = TREE_TYPE (newsmt); if (alias_set_subset_of (get_alias_set (newsmttype), smtset)) - bitmap_set_bit (solution, DECL_UID (newsmt)); + bitmap_set_bit (solution, i); } aliases = MTAG_ALIASES (smt); |