aboutsummaryrefslogtreecommitdiff
path: root/gcc/tree-ssa-alias.c
diff options
context:
space:
mode:
authorRichard Guenther <rguenther@suse.de>2008-06-28 13:17:20 +0000
committerRichard Biener <rguenth@gcc.gnu.org>2008-06-28 13:17:20 +0000
commit15c151967dd1cde61b79d26374f608f63a29d411 (patch)
treec154f74717a3c268c9eb1d50886dc65b0a3c38db /gcc/tree-ssa-alias.c
parentff1c393bd32f3b018957ba9f552e344ab040f309 (diff)
downloadgcc-15c151967dd1cde61b79d26374f608f63a29d411.zip
gcc-15c151967dd1cde61b79d26374f608f63a29d411.tar.gz
gcc-15c151967dd1cde61b79d26374f608f63a29d411.tar.bz2
tree-ssa-structalias.c (callused_id, [...]): Add.
2008-06-28 Richard Guenther <rguenther@suse.de> * tree-ssa-structalias.c (callused_id, var_callused, callused_tree): Add. (handle_pure_call): New function. (find_func_aliases): Call it. (find_what_p_points_to): Handle the call-used set. (clobber_what_escaped): Likewise. (compute_call_used_vars): New function. (init_base_vars): Init the call-used variable. (do_sd_constraint): Do not propagate the solution from CALLUSED but use CALLUSED as a placeholder. (solve_graph): Likewise. * tree-flow-inline.h (gimple_call_used_vars): New function. * tree-flow.h (struct gimple_df): Add call_used_vars bitmap. (compute_call_used_vars): Declare. * tree-ssa-alias.c (set_initial_properties): Call compute_call_used_vars. (reset_alias_info): Clear call-used variables. (add_call_clobber_ops): Assert we are not called for const/pure functions. Remove handling of them. (add_call_read_ops): Handle pure functions by adding the call-used set of variables as VUSEs. * tree-ssa.c (init_tree_ssa): Allocate call-used bitmap. (delete_tree_ssa): Free it. * tree-dfa.c (remove_referenced_var): Clear the var from the call-used bitmap. * gcc.dg/tree-ssa/pr24287.c: Remove XFAIL. From-SVN: r137222
Diffstat (limited to 'gcc/tree-ssa-alias.c')
-rw-r--r--gcc/tree-ssa-alias.c7
1 files changed, 6 insertions, 1 deletions
diff --git a/gcc/tree-ssa-alias.c b/gcc/tree-ssa-alias.c
index 7c24739..9a6552b 100644
--- a/gcc/tree-ssa-alias.c
+++ b/gcc/tree-ssa-alias.c
@@ -505,7 +505,7 @@ compute_tag_properties (void)
VEC_free (tree, heap, taglist);
}
-/* Set up the initial variable clobbers and globalness.
+/* Set up the initial variable clobbers, call-uses and globalness.
When this function completes, only tags whose aliases need to be
clobbered will be set clobbered. Tags clobbered because they
contain call clobbered vars are handled in compute_tag_properties. */
@@ -543,6 +543,8 @@ set_initial_properties (struct alias_info *ai)
pt_anything_mask |= ESCAPE_TO_CALL;
}
+ compute_call_used_vars ();
+
for (i = 0; VEC_iterate (tree, ai->processed_ptrs, i, ptr); i++)
{
struct ptr_info_def *pi = SSA_NAME_PTR_INFO (ptr);
@@ -2000,6 +2002,9 @@ reset_alias_info (void)
/* There should be no call-clobbered variable left. */
gcc_assert (bitmap_empty_p (gimple_call_clobbered_vars (cfun)));
+ /* Clear the call-used variables. */
+ bitmap_clear (gimple_call_used_vars (cfun));
+
/* Clear flow-sensitive points-to information from each SSA name. */
for (i = 1; i < num_ssa_names; i++)
{