diff options
author | dberlin <dberlin@138bc75d-0d04-0410-961f-82ee72b054a4> | 2007-01-29 19:38:00 +0000 |
---|---|---|
committer | dberlin <dberlin@138bc75d-0d04-0410-961f-82ee72b054a4> | 2007-01-29 19:38:00 +0000 |
commit | 0eaf9bd7a35585122f7e20929377f8902e6dc3ce (patch) | |
tree | 7897072edfc0eae9bd0cdbca19fba28cbf0e59c8 /gcc/tree-ssa-operands.c | |
parent | 8b6c1d2e8b7fdd171dfb9e65fe44685b2af698f6 (diff) | |
download | gcc-0eaf9bd7a35585122f7e20929377f8902e6dc3ce.tar.gz |
2007-01-28 Daniel Berlin <dberlin@dberlin.org>
* tree.h (struct tree_memory_tag): Add aliases member.
(MTAG_ALIASES): New macro.
* tree-ssa-alias.c (alias_bitmap_obstack): New variable.
(add_may_alias): Remove pointer-set. Update for may_aliases being
a bitmap.
(mark_aliases_call_clobbered): Update for may_aliases being a
bitmap.
(compute_tag_properties): Ditto.
(create_partition_for): Ditto.
(compute_memory_partitions): Ditto.
(dump_may_aliases_for): Ditto.
(is_aliased_with): Ditto.
(add_may_alias_for_new_tag): Ditto.
(rewrite_alias_set_for): Rewrite for may_aliases being a bitmap.
(compute_is_aliased): New function.
(compute_may_aliases): Call compute_is_aliased).
(init_alias_info): Initialize alias_bitmap_obstack.
(union_alias_set_into): New function.
(compute_flow_sensitive_aliasing): Use union_aliases_into.
(have_common_aliases_p): Rewrite to take two bitmaps and use
intersection.
(compute_flow_insensitive_aliasing): Stop using pointer-sets.
Update for bitmaps.
(finalize_ref_all_pointers): Update for add_may_alias changes.
(new_type_alias): Ditto.
* tree-flow-inline.h (may_aliases): Return a bitmap.
* tree-dfa.c (dump_variable): Check for MTAG_P'ness.
* tree-ssa.c (verify_flow_insensitive_alias_info): Update for
may_aliases being a bitmap.
* tree-flow.h (struct var_ann_d): Remove may_aliases member.
may_aliases now returns a bitmap.
* tree-ssa-structalias.c (merge_smts_into): Update for may_aliases
being a bitmap.
* tree-ssa-operands.c (add_virtual_operand): Update for
may_aliases being a bitmap.
git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/trunk@121302 138bc75d-0d04-0410-961f-82ee72b054a4
Diffstat (limited to 'gcc/tree-ssa-operands.c')
-rw-r--r-- | gcc/tree-ssa-operands.c | 19 |
1 files changed, 11 insertions, 8 deletions
diff --git a/gcc/tree-ssa-operands.c b/gcc/tree-ssa-operands.c index 44e8707844f..aa56c197a25 100644 --- a/gcc/tree-ssa-operands.c +++ b/gcc/tree-ssa-operands.c @@ -1441,7 +1441,7 @@ add_virtual_operand (tree var, stmt_ann_t s_ann, int flags, tree full_ref, HOST_WIDE_INT offset, HOST_WIDE_INT size, bool for_clobber) { - VEC(tree,gc) *aliases; + bitmap aliases = NULL; tree sym; var_ann_t v_ann; @@ -1479,7 +1479,8 @@ add_virtual_operand (tree var, stmt_ann_t s_ann, int flags, if (flags & opf_no_vops) return; - aliases = v_ann->may_aliases; + if (MTAG_P (var)) + aliases = MTAG_ALIASES (var); if (aliases == NULL) { if (s_ann && !gimple_aliases_computed_p (cfun)) @@ -1492,19 +1493,20 @@ add_virtual_operand (tree var, stmt_ann_t s_ann, int flags, } else { - unsigned i; + bitmap_iterator bi; + unsigned int i; tree al; /* The variable is aliased. Add its aliases to the virtual operands. */ - gcc_assert (VEC_length (tree, aliases) != 0); + gcc_assert (!bitmap_empty_p (aliases)); if (flags & opf_def) { bool none_added = true; - - for (i = 0; VEC_iterate (tree, aliases, i, al); i++) + EXECUTE_IF_SET_IN_BITMAP (aliases, 0, i, bi) { + al = referenced_var (i); if (!access_can_touch_variable (full_ref, al, offset, size)) continue; @@ -1534,14 +1536,15 @@ add_virtual_operand (tree var, stmt_ann_t s_ann, int flags, else { bool none_added = true; - for (i = 0; VEC_iterate (tree, aliases, i, al); i++) + EXECUTE_IF_SET_IN_BITMAP (aliases, 0, i, bi) { + al = referenced_var (i); if (!access_can_touch_variable (full_ref, al, offset, size)) continue; none_added = false; append_vuse (al); } - + /* Similarly, append a virtual uses for VAR itself, when it is an alias tag. */ if (v_ann->is_aliased || none_added) |