diff options
author | rguenth <rguenth@138bc75d-0d04-0410-961f-82ee72b054a4> | 2008-02-28 09:56:54 +0000 |
---|---|---|
committer | rguenth <rguenth@138bc75d-0d04-0410-961f-82ee72b054a4> | 2008-02-28 09:56:54 +0000 |
commit | c0ff55b30de767e169675950e7dd20cae02fbacd (patch) | |
tree | 827872f3375cda4e3f251831d7fabfc631d7be29 /gcc/tree-sra.c | |
parent | e28f683e43459b30572ab442010230be9259a070 (diff) | |
download | gcc-c0ff55b30de767e169675950e7dd20cae02fbacd.tar.gz |
2008-02-28 Richard Guenther <rguenther@suse.de>
Revert:
2008-02-26 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.
(remove_decl_from_map): Likewise.
* 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.
(remove_decl_from_map): Likewise.
(print_decl_for_uid_map_statistics): New helper.
(dump_tree_statistics): Call it.
cp/
* decl.c (duplicate_decls): Remove decl from global mapping
before ggc_freeing 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.
git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/trunk@132740 138bc75d-0d04-0410-961f-82ee72b054a4
Diffstat (limited to 'gcc/tree-sra.c')
-rw-r--r-- | gcc/tree-sra.c | 23 |
1 files changed, 13 insertions, 10 deletions
diff --git a/gcc/tree-sra.c b/gcc/tree-sra.c index ba1db90a996..26f1af4196a 100644 --- a/gcc/tree-sra.c +++ b/gcc/tree-sra.c @@ -1162,17 +1162,18 @@ scan_function (void) static const struct sra_walk_fns fns = { scan_use, scan_copy, scan_init, scan_ldst, true }; + bitmap_iterator bi; sra_walk_function (&fns); if (dump_file && (dump_flags & TDF_DETAILS)) { - referenced_var_iterator ri; - tree var; + unsigned i; fputs ("\nScan results:\n", dump_file); - FOR_EACH_REFERENCED_VAR_IN_BITMAP (sra_candidates, var, ri) + EXECUTE_IF_SET_IN_BITMAP (sra_candidates, 0, i, bi) { + tree var = referenced_var (i); struct sra_elt *elt = lookup_element (NULL, var, NULL, NO_INSERT); if (elt) scan_dump (elt); @@ -1949,18 +1950,19 @@ decide_block_copy (struct sra_elt *elt) static void decide_instantiations (void) { + unsigned int i; bool cleared_any; bitmap_head done_head; - referenced_var_iterator ri; - tree var; + bitmap_iterator bi; /* We cannot clear bits from a bitmap we're iterating over, so save up all the bits to clear until the end. */ bitmap_initialize (&done_head, &bitmap_default_obstack); cleared_any = false; - FOR_EACH_REFERENCED_VAR_IN_BITMAP (sra_candidates, var, ri) + EXECUTE_IF_SET_IN_BITMAP (sra_candidates, 0, i, bi) { + tree var = referenced_var (i); struct sra_elt *elt = lookup_element (NULL, var, NULL, NO_INSERT); if (elt) { @@ -1970,7 +1972,7 @@ decide_instantiations (void) } if (!elt) { - bitmap_set_bit (&done_head, DECL_UID (var)); + bitmap_set_bit (&done_head, i); cleared_any = true; } } @@ -3530,11 +3532,12 @@ static void scalarize_parms (void) { tree list = NULL; - referenced_var_iterator ri; - tree var; + unsigned i; + bitmap_iterator bi; - FOR_EACH_REFERENCED_VAR_IN_BITMAP (needs_copy_in, var, ri) + EXECUTE_IF_SET_IN_BITMAP (needs_copy_in, 0, i, bi) { + tree var = referenced_var (i); struct sra_elt *elt = lookup_element (NULL, var, NULL, NO_INSERT); generate_copy_inout (elt, true, var, &list); } |