diff options
author | Martin Jambor <mjambor@suse.cz> | 2010-12-09 16:16:22 +0100 |
---|---|---|
committer | Martin Jambor <jamborm@gcc.gnu.org> | 2010-12-09 16:16:22 +0100 |
commit | 82d4982997c2e296135eb0c2f8f6c11b445c9484 (patch) | |
tree | b9b56ea61d799eb9047c570a47d2d6d142e02c00 /gcc/tree-sra.c | |
parent | 544ae3f5fd694689b2eeb480b14acc316e49fa27 (diff) | |
download | gcc-82d4982997c2e296135eb0c2f8f6c11b445c9484.zip gcc-82d4982997c2e296135eb0c2f8f6c11b445c9484.tar.gz gcc-82d4982997c2e296135eb0c2f8f6c11b445c9484.tar.bz2 |
ipa-prop.h (struct ipa_parm_adjustment): New field alias_ptr_type.
2010-12-09 Martin Jambor <mjambor@suse.cz>
* ipa-prop.h (struct ipa_parm_adjustment): New field alias_ptr_type.
* ipa-prop.c (ipa_modify_call_arguments): Use it.
* tree-sra.c (splice_param_accesses): Test that all accesses have the
same alias reference type.
(turn_representatives_into_adjustments): Set alias_ptr_type of the
adjustment.
From-SVN: r167641
Diffstat (limited to 'gcc/tree-sra.c')
-rw-r--r-- | gcc/tree-sra.c | 6 |
1 files changed, 5 insertions, 1 deletions
diff --git a/gcc/tree-sra.c b/gcc/tree-sra.c index 4330a17..9d22ad7 100644 --- a/gcc/tree-sra.c +++ b/gcc/tree-sra.c @@ -3563,10 +3563,12 @@ splice_param_accesses (tree parm, bool *ro_grp) while (i < access_count) { bool modification; + tree a1_alias_type; access = VEC_index (access_p, access_vec, i); modification = access->write; if (access_precludes_ipa_sra_p (access)) return NULL; + a1_alias_type = reference_alias_ptr_type (access->expr); /* Access is about to become group representative unless we find some nasty overlap which would preclude us from breaking this parameter @@ -3590,7 +3592,8 @@ splice_param_accesses (tree parm, bool *ro_grp) if (access_precludes_ipa_sra_p (ac2) || (ac2->type != access->type && (TREE_ADDRESSABLE (ac2->type) - || TREE_ADDRESSABLE (access->type)))) + || TREE_ADDRESSABLE (access->type))) + || (reference_alias_ptr_type (ac2->expr) != a1_alias_type)) return NULL; modification |= ac2->write; @@ -3825,6 +3828,7 @@ turn_representatives_into_adjustments (VEC (access_p, heap) *representatives, adj->base_index = index; adj->base = repr->base; adj->type = repr->type; + adj->alias_ptr_type = reference_alias_ptr_type (repr->expr); adj->offset = repr->offset; adj->by_ref = (POINTER_TYPE_P (TREE_TYPE (repr->base)) && (repr->grp_maybe_modified |