aboutsummaryrefslogtreecommitdiff
path: root/gcc/tree-ssa-structalias.c
diff options
context:
space:
mode:
authorRichard Guenther <rguenther@suse.de>2009-06-16 14:12:44 +0000
committerRichard Biener <rguenth@gcc.gnu.org>2009-06-16 14:12:44 +0000
commit2e4078422e64a42224ca69daa70604885698a942 (patch)
tree7cde33eea870313f90b60f30132fd44837a55153 /gcc/tree-ssa-structalias.c
parentf2ff88729a86a0db86cc6a6ea98d3d5ebfeaa231 (diff)
downloadgcc-2e4078422e64a42224ca69daa70604885698a942.zip
gcc-2e4078422e64a42224ca69daa70604885698a942.tar.gz
gcc-2e4078422e64a42224ca69daa70604885698a942.tar.bz2
tree-ssa-alias.c (is_escape_site): Remove.
2009-06-16 Richard Guenther <rguenther@suse.de> * tree-ssa-alias.c (is_escape_site): Remove. * tree-ssa-alias.h (enum escape_type): Remove. (is_escape_site): Likewise. * tree-ssa-structalias.c (find_func_aliases): Handle escapes via casts and asms without deferring to is_escape_site. From-SVN: r148534
Diffstat (limited to 'gcc/tree-ssa-structalias.c')
-rw-r--r--gcc/tree-ssa-structalias.c14
1 files changed, 6 insertions, 8 deletions
diff --git a/gcc/tree-ssa-structalias.c b/gcc/tree-ssa-structalias.c
index 62a1e43..f60b24c 100644
--- a/gcc/tree-ssa-structalias.c
+++ b/gcc/tree-ssa-structalias.c
@@ -3561,7 +3561,6 @@ find_func_aliases (gimple origt)
VEC(ce_s, heap) *lhsc = NULL;
VEC(ce_s, heap) *rhsc = NULL;
struct constraint_expr *c;
- enum escape_type stmt_escape_type;
/* Now build constraints expressions. */
if (gimple_code (t) == GIMPLE_PHI)
@@ -3759,16 +3758,15 @@ find_func_aliases (gimple origt)
&& is_global_var (lhsop))
make_escape_constraint (rhsop);
}
-
- stmt_escape_type = is_escape_site (t);
- if (stmt_escape_type == ESCAPE_BAD_CAST)
+ /* For conversions of pointers to non-pointers the pointer escapes. */
+ else if (gimple_assign_cast_p (t)
+ && POINTER_TYPE_P (TREE_TYPE (gimple_assign_rhs1 (t)))
+ && !POINTER_TYPE_P (TREE_TYPE (gimple_assign_lhs (t))))
{
- gcc_assert (is_gimple_assign (t));
- gcc_assert (CONVERT_EXPR_CODE_P (gimple_assign_rhs_code (t))
- || gimple_assign_rhs_code (t) == VIEW_CONVERT_EXPR);
make_escape_constraint (gimple_assign_rhs1 (t));
}
- else if (stmt_escape_type == ESCAPE_TO_ASM)
+ /* Handle asms conservatively by adding escape constraints to everything. */
+ else if (gimple_code (t) == GIMPLE_ASM)
{
unsigned i, noutputs;
const char **oconstraints;