summaryrefslogtreecommitdiff
path: root/gcc/tree-ssa-structalias.c
diff options
context:
space:
mode:
authorrguenth <rguenth@138bc75d-0d04-0410-961f-82ee72b054a4>2008-05-08 09:27:29 +0000
committerrguenth <rguenth@138bc75d-0d04-0410-961f-82ee72b054a4>2008-05-08 09:27:29 +0000
commit2afb4be3f459389193b437bb0b0413700f93655a (patch)
treee452b11cd2f2f07a867f70870559e7b21b003d58 /gcc/tree-ssa-structalias.c
parent6cbd9ceb866a4f181dcfcd2d28f01acea5e15e00 (diff)
downloadgcc-2afb4be3f459389193b437bb0b0413700f93655a.tar.gz
2008-05-08 Richard Guenther <rguenther@suse.de>
* tree-data-ref.c (dr_analyze_alias): Do not set DR_SUBVARS. * tree-data-ref.h (struct dr_alias): Remove subvars field. (DR_SUBVARS): Remove. * tree-dfa.c (dump_subvars_for): Remove. (debug_subvars_for): Likewise. (dump_variable): Do not dump subvars. (remove_referenced_var): Do not remove subvars. * tree-flow-inline.h (clear_call_clobbered): SFTs no longer exist. (lookup_subvars_for_var): Remove. (get_subvars_for_var): Likewise. (get_subvars_at): Likewise. (get_first_overlapping_subvar): Likewise. (overlap_subvar): Likewise. * tree-flow.h (subvar_t): Remove. (struct var_ann_d): Remove subvars field. * tree-ssa-alias.c (mark_aliases_call_clobbered): Remove queued argument. Remove special handling of SFTs. (compute_tag_properties): Likewise. (set_initial_properties): Likewise. (compute_call_clobbered): Likewise. (count_mem_refs): Likewise. (compute_memory_partitions): Likewise. (compute_flow_insensitive_aliasing): Likewise. (setup_pointers_and_addressables): Likewise. (new_type_alias): Likewise. (struct used_part): Remove. (used_portions): Likewise. (struct used_part_map): Likewise. (used_part_map_eq): Likewise. (used_part_map_hash): Likewise. (free_used_part_map): Likewise. (up_lookup): Likewise. (up_insert): Likewise. (get_or_create_used_part_for): Likewise. (create_sft): Likewise. (create_overlap_variables_for): Likewise. (find_used_portions): Likewise. (create_structure_vars): Likewise. * tree.def (STRUCT_FIELD_TAG): Remove. * tree.h (MTAG_P): Adjust. (struct tree_memory_tag): Remove base_for_components and unpartitionable flags. (struct tree_struct_field_tag): Remove. (SFT_PARENT_VAR): Likewise. (SFT_OFFSET): Likewise. (SFT_SIZE): Likewise. (SFT_NONADDRESSABLE_P): Likewise. (SFT_ALIAS_SET): Likewise. (SFT_UNPARTITIONABLE_P): Likewise. (SFT_BASE_FOR_COMPONENTS_P): Likewise. (union tree_node): Remove sft field. * alias.c (get_alias_set): Remove special handling of SFTs. * print-tree.c (print_node): Remove handling of SFTs. * tree-dump.c (dequeue_and_dump): Likewise. * tree-into-ssa.c (mark_sym_for_renaming): Likewise. * tree-nrv.c (dest_safe_for_nrv_p): Remove special handling of SFTs. * tree-predcom.c (set_alias_info): Do not set subvars. * tree-pretty-print.c (dump_generic_node): Do not handle SFTs. * tree-ssa-loop-ivopts.c (get_ref_tag): Likewise. * tree-ssa-operands.c (access_can_touch_variable): Likewise. (add_vars_for_offset): Remove. (add_virtual_operand): Remove special handling of SFTs. (add_call_clobber_ops): Likewise. (add_call_read_ops): Likewise. (get_asm_expr_operands): Likewise. (get_modify_stmt_operands): Likewise. (get_expr_operands): Likewise. (add_to_addressable_set): Likewise. * tree-ssa.c (verify_ssa_name): Do not handle SFTs. * tree-tailcall.c (suitable_for_tail_opt_p): Likewise. * tree-vect-transform.c (vect_create_data_ref_ptr): Do not set subvars. * tree.c (init_ttree): Remove STRUCT_FIELD_TAG initialization. (tree_code_size): Remove STRUCT_FIELD_TAG handling. (tree_node_structure): Likewise. * tree-ssa-structalias.c (set_uids_in_ptset): Remove special handling of SFTs. (find_what_p_points_to): Likewise. git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/trunk@135077 138bc75d-0d04-0410-961f-82ee72b054a4
Diffstat (limited to 'gcc/tree-ssa-structalias.c')
-rw-r--r--gcc/tree-ssa-structalias.c85
1 files changed, 15 insertions, 70 deletions
diff --git a/gcc/tree-ssa-structalias.c b/gcc/tree-ssa-structalias.c
index d58478ebeb2..b9afe3b22e3 100644
--- a/gcc/tree-ssa-structalias.c
+++ b/gcc/tree-ssa-structalias.c
@@ -4713,88 +4713,35 @@ set_uids_in_ptset (tree ptr, bitmap into, bitmap from, bool is_derefed,
{
unsigned int i;
bitmap_iterator bi;
- alias_set_type ptr_alias_set;
gcc_assert (POINTER_TYPE_P (TREE_TYPE (ptr)));
- ptr_alias_set = get_alias_set (TREE_TYPE (TREE_TYPE (ptr)));
EXECUTE_IF_SET_IN_BITMAP (from, 0, i, bi)
{
varinfo_t vi = get_varinfo (i);
- alias_set_type var_alias_set;
/* The only artificial variables that are allowed in a may-alias
set are heap variables. */
if (vi->is_artificial_var && !vi->is_heap_var)
continue;
- if (vi->has_union && get_subvars_for_var (vi->decl) != NULL)
+ if (TREE_CODE (vi->decl) == VAR_DECL
+ || TREE_CODE (vi->decl) == PARM_DECL
+ || TREE_CODE (vi->decl) == RESULT_DECL)
{
- unsigned int i;
- tree subvar;
- subvar_t sv = get_subvars_for_var (vi->decl);
-
- /* Variables containing unions may need to be converted to
- their SFT's, because SFT's can have unions and we cannot. */
- for (i = 0; VEC_iterate (tree, sv, i, subvar); ++i)
- bitmap_set_bit (into, DECL_UID (subvar));
- }
- else if (TREE_CODE (vi->decl) == VAR_DECL
- || TREE_CODE (vi->decl) == PARM_DECL
- || TREE_CODE (vi->decl) == RESULT_DECL)
- {
- subvar_t sv;
- if (var_can_have_subvars (vi->decl)
- && (sv = get_subvars_for_var (vi->decl)))
- {
- /* If VI->DECL is an aggregate for which we created
- SFTs, add the SFT corresponding to VI->OFFSET.
- If we didn't do field-sensitive PTA we need to to
- add all overlapping SFTs. */
- unsigned int j;
- tree sft = get_first_overlapping_subvar (sv, vi->offset,
- vi->size, &j);
- gcc_assert (sft);
- for (; VEC_iterate (tree, sv, j, sft); ++j)
- {
- if (SFT_OFFSET (sft) > vi->offset
- && vi->size <= SFT_OFFSET (sft) - vi->offset)
- break;
-
- var_alias_set = get_alias_set (sft);
- if (no_tbaa_pruning
- || (!is_derefed && !vi->directly_dereferenced)
- || alias_sets_conflict_p (ptr_alias_set, var_alias_set))
- {
- bitmap_set_bit (into, DECL_UID (sft));
-
- /* Pointed-to SFTs are needed by the operand scanner
- to adjust offsets when adding operands to memory
- expressions that dereference PTR. This means
- that memory partitioning may not partition
- this SFT because the operand scanner will not
- be able to find the other SFTs next to this
- one. But we only need to do this if the pointed
- to type is aggregate. */
- if (SFT_BASE_FOR_COMPONENTS_P (sft))
- SFT_UNPARTITIONABLE_P (sft) = true;
- }
- }
- }
+ /* Just add VI->DECL to the alias set.
+ Don't type prune artificial vars. */
+ if (vi->is_artificial_var)
+ bitmap_set_bit (into, DECL_UID (vi->decl));
else
{
- /* Otherwise, just add VI->DECL to the alias set.
- Don't type prune artificial vars. */
- if (vi->is_artificial_var)
- bitmap_set_bit (into, DECL_UID (vi->decl));
- else
- {
- var_alias_set = get_alias_set (vi->decl);
- if (no_tbaa_pruning
- || (!is_derefed && !vi->directly_dereferenced)
- || alias_sets_conflict_p (ptr_alias_set, var_alias_set))
- bitmap_set_bit (into, DECL_UID (vi->decl));
- }
+ alias_set_type var_alias_set, ptr_alias_set;
+ var_alias_set = get_alias_set (vi->decl);
+ ptr_alias_set = get_alias_set (TREE_TYPE (TREE_TYPE (ptr)));
+ if (no_tbaa_pruning
+ || (!is_derefed && !vi->directly_dereferenced)
+ || alias_sets_conflict_p (ptr_alias_set, var_alias_set))
+ bitmap_set_bit (into, DECL_UID (vi->decl));
}
}
}
@@ -4923,9 +4870,7 @@ find_what_p_points_to (tree p)
/* Nothing currently asks about structure fields directly,
but when they do, we need code here to hand back the
points-to set. */
- if (!var_can_have_subvars (vi->decl)
- || get_subvars_for_var (vi->decl) == NULL)
- return false;
+ return false;
}
else
{