summaryrefslogtreecommitdiff
path: root/gcc/tree-ssa-alias.c
diff options
context:
space:
mode:
authorrguenth <rguenth@138bc75d-0d04-0410-961f-82ee72b054a4>2008-06-12 10:21:45 +0000
committerrguenth <rguenth@138bc75d-0d04-0410-961f-82ee72b054a4>2008-06-12 10:21:45 +0000
commitc7b7959229da64bc6ec4d76bd9b61ec44aa51c11 (patch)
treee7f6dd778d69424ba44e89344260ba54c29fac8c /gcc/tree-ssa-alias.c
parent2ec89d4f6c3a0cd4a82c49b627ce879b491cdb3e (diff)
downloadgcc-c7b7959229da64bc6ec4d76bd9b61ec44aa51c11.tar.gz
2008-06-12 Richard Guenther <rguenther@suse.de>
PR tree-optimization/36345 * tree-flow.h (struct ptr_info_def): Align escape_mask, add memory_tag_needed flag. (may_alias_p): Declare. * tree-ssa-alias.c (may_alias_p): Export. (set_initial_properties): Use memory_tag_needed flag. (update_reference_counts): Likewise. (reset_alias_info): Reset memory_tag_needed flag. (create_name_tags): Check memory_tag_needed flag. (dump_points_to_info_for): Dump it. * tree-ssa-structalias.c (struct variable_info): Remove directly_dereferenced flag. (new_var_info): Do not initialize it. (process_constraint_1): Do not set it. (update_alias_info): Set is_dereferenced flag. (set_uids_in_ptset): Use may_alias_p. (set_used_smts): Check memory_tag_needed flag. (find_what_p_points_to): Likewise. Pass is_dereferenced flag. * tree-ssa-alias.c (verify_flow_sensitive_alias_info): Check memory_tag_needed flag. * tree-ssa-alias-warnings.c (dsa_named_for): Try to recover from broken design. * gcc.c-torture/execute/20020619-1.c: Remove broken part of the testcase. git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/trunk@136695 138bc75d-0d04-0410-961f-82ee72b054a4
Diffstat (limited to 'gcc/tree-ssa-alias.c')
-rw-r--r--gcc/tree-ssa-alias.c14
1 files changed, 8 insertions, 6 deletions
diff --git a/gcc/tree-ssa-alias.c b/gcc/tree-ssa-alias.c
index e89e73b9f59..0e5071994de 100644
--- a/gcc/tree-ssa-alias.c
+++ b/gcc/tree-ssa-alias.c
@@ -197,7 +197,6 @@ static bitmap_obstack alias_bitmap_obstack;
/* Local functions. */
static void compute_flow_insensitive_aliasing (struct alias_info *);
static void dump_alias_stats (FILE *);
-static bool may_alias_p (tree, alias_set_type, tree, alias_set_type, bool);
static tree create_memory_tag (tree type, bool is_type_tag);
static tree get_smt_for (tree, struct alias_info *);
static tree get_nmt_for (tree);
@@ -588,14 +587,14 @@ set_initial_properties (struct alias_info *ai)
So removing this code and fixing all the bugs would be nice.
It is the cause of a bunch of clobbering. */
if ((pi->pt_global_mem || pi->pt_anything)
- && pi->is_dereferenced && pi->name_mem_tag)
+ && pi->memory_tag_needed && pi->name_mem_tag)
{
mark_call_clobbered (pi->name_mem_tag, ESCAPE_IS_GLOBAL);
MTAG_GLOBAL (pi->name_mem_tag) = true;
}
if ((pi->pt_global_mem || pi->pt_anything)
- && pi->is_dereferenced
+ && pi->memory_tag_needed
&& tag)
{
mark_call_clobbered (tag, ESCAPE_IS_GLOBAL);
@@ -1278,7 +1277,7 @@ update_reference_counts (struct mem_ref_stats_d *mem_ref_stats)
if (ptr
&& POINTER_TYPE_P (TREE_TYPE (ptr))
&& (pi = SSA_NAME_PTR_INFO (ptr)) != NULL
- && pi->is_dereferenced)
+ && pi->memory_tag_needed)
{
unsigned j;
bitmap_iterator bj;
@@ -2027,6 +2026,7 @@ reset_alias_info (void)
pi->pt_anything = 0;
pi->pt_null = 0;
pi->value_escapes_p = 0;
+ pi->memory_tag_needed = 0;
pi->is_dereferenced = 0;
if (pi->pt_vars)
bitmap_clear (pi->pt_vars);
@@ -2170,7 +2170,7 @@ create_name_tags (void)
pi = SSA_NAME_PTR_INFO (ptr);
- if (pi->pt_anything || !pi->is_dereferenced)
+ if (pi->pt_anything || !pi->memory_tag_needed)
{
/* No name tags for pointers that have not been
dereferenced or point to an arbitrary location. */
@@ -2649,7 +2649,7 @@ maybe_create_global_var (void)
VAR_ALIAS_SET is the alias set for VAR. */
-static bool
+bool
may_alias_p (tree ptr, alias_set_type mem_alias_set,
tree var, alias_set_type var_alias_set,
bool alias_set_only)
@@ -3231,6 +3231,8 @@ dump_points_to_info_for (FILE *file, tree ptr)
if (pi->is_dereferenced)
fprintf (file, ", is dereferenced");
+ else if (pi->memory_tag_needed)
+ fprintf (file, ", is dereferenced in call");
if (pi->value_escapes_p)
fprintf (file, ", its value escapes");