diff options
author | rguenth <rguenth@138bc75d-0d04-0410-961f-82ee72b054a4> | 2009-06-16 14:12:44 +0000 |
---|---|---|
committer | rguenth <rguenth@138bc75d-0d04-0410-961f-82ee72b054a4> | 2009-06-16 14:12:44 +0000 |
commit | e8146f09dd5125421f06a96bdb1c57e45920f946 (patch) | |
tree | 7cde33eea870313f90b60f30132fd44837a55153 /gcc/tree-ssa-structalias.c | |
parent | 60a132a95ad5c01ef79b1233f4058d44cd058e87 (diff) | |
download | gcc-e8146f09dd5125421f06a96bdb1c57e45920f946.tar.gz |
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.
git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/trunk@148534 138bc75d-0d04-0410-961f-82ee72b054a4
Diffstat (limited to 'gcc/tree-ssa-structalias.c')
-rw-r--r-- | gcc/tree-ssa-structalias.c | 14 |
1 files changed, 6 insertions, 8 deletions
diff --git a/gcc/tree-ssa-structalias.c b/gcc/tree-ssa-structalias.c index 62a1e43309e..f60b24c9c52 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; |