diff options
author | dnovillo <dnovillo@138bc75d-0d04-0410-961f-82ee72b054a4> | 2007-03-02 19:20:14 +0000 |
---|---|---|
committer | dnovillo <dnovillo@138bc75d-0d04-0410-961f-82ee72b054a4> | 2007-03-02 19:20:14 +0000 |
commit | 085b7aab6cdbf28e81ba29002ec2063911ad4b89 (patch) | |
tree | d115232be79b943f236094caa9dfca2dd4373647 /gcc/tree-ssa-structalias.c | |
parent | 58a868e4ddd9ed63e39b3559ca3cadbc061dee9d (diff) | |
download | gcc-085b7aab6cdbf28e81ba29002ec2063911ad4b89.tar.gz |
* tree-ssa-structalias.c (could_have_pointers): Tidy.
(get_constraint_for): Likewise.
(do_structure_copy): Likewise.
(find_func_aliases): Fix references to MODIFY_EXPR.
(intra_create_variable_infos): Tidy.
* tree-ssa-operands.c (add_virtual_operand): Add argument
IS_CALL_SITE.
When adding members of alias sets, if IS_CALL_SITE is true and
the symbol is not call-clobbered, skip it.
Adjust all callers.
testsuite/ChangeLog
* gcc.dg/tree-ssa/20070302-1.c: New test.
git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/trunk@122484 138bc75d-0d04-0410-961f-82ee72b054a4
Diffstat (limited to 'gcc/tree-ssa-structalias.c')
-rw-r--r-- | gcc/tree-ssa-structalias.c | 17 |
1 files changed, 11 insertions, 6 deletions
diff --git a/gcc/tree-ssa-structalias.c b/gcc/tree-ssa-structalias.c index f031bf0102f..fc5bee8a920 100644 --- a/gcc/tree-ssa-structalias.c +++ b/gcc/tree-ssa-structalias.c @@ -2312,9 +2312,11 @@ could_have_pointers (tree t) { tree type = TREE_TYPE (t); - if (POINTER_TYPE_P (type) || AGGREGATE_TYPE_P (type) + if (POINTER_TYPE_P (type) + || AGGREGATE_TYPE_P (type) || TREE_CODE (type) == COMPLEX_TYPE) return true; + return false; } @@ -2524,6 +2526,7 @@ get_constraint_for (tree t, VEC (ce_s, heap) **results) tree pttype = TREE_TYPE (TREE_TYPE (t)); get_constraint_for (exp, results); + /* Make sure we capture constraints to all elements of an array. */ if ((handled_component_p (exp) @@ -3001,6 +3004,7 @@ do_structure_copy (tree lhsop, tree rhsop) } } + /* Update related alias information kept in AI. This is used when building name tags, alias sets and deciding grouping heuristics. STMT is the statement to process. This function also updates @@ -3326,9 +3330,9 @@ find_func_aliases (tree origt) } } /* In IPA mode, we need to generate constraints to pass call - arguments through their calls. There are two case, either a - modify_expr when we are returning a value, or just a plain - call_expr when we are not. */ + arguments through their calls. There are two cases, either a + GIMPLE_MODIFY_STMT when we are returning a value, or just a plain + CALL_EXPR when we are not. */ else if (in_ipa_mode && ((TREE_CODE (t) == GIMPLE_MODIFY_STMT && TREE_CODE (GIMPLE_STMT_OPERAND (t, 1)) == CALL_EXPR @@ -3399,6 +3403,7 @@ find_func_aliases (tree origt) } i++; } + /* If we are returning a value, assign it to the result. */ if (lhsop) { @@ -4099,8 +4104,8 @@ intra_create_variable_infos (void) tree t; struct constraint_expr lhs, rhs; - /* For each incoming pointer argument arg, ARG = ANYTHING or a - dummy variable if flag_argument_noalias > 2. */ + /* For each incoming pointer argument arg, create the constraint ARG + = ANYTHING or a dummy variable if flag_argument_noalias is set. */ for (t = DECL_ARGUMENTS (current_function_decl); t; t = TREE_CHAIN (t)) { varinfo_t p; |