diff options
author | Martin Jambor <mjambor@suse.cz> | 2010-12-09 16:27:14 +0100 |
---|---|---|
committer | Martin Jambor <jamborm@gcc.gnu.org> | 2010-12-09 16:27:14 +0100 |
commit | 54e348cb3bc7abf1be42c8e286b936f2c0a3a673 (patch) | |
tree | d4101ed6620102f31a146ea37cb452317193b602 /gcc | |
parent | 82d4982997c2e296135eb0c2f8f6c11b445c9484 (diff) | |
download | gcc-54e348cb3bc7abf1be42c8e286b936f2c0a3a673.zip gcc-54e348cb3bc7abf1be42c8e286b936f2c0a3a673.tar.gz gcc-54e348cb3bc7abf1be42c8e286b936f2c0a3a673.tar.bz2 |
ipa-prop.c (compute_complex_ancestor_jump_func): Work also if the zero is the first phi parameter.
2010-12-09 Martin Jambor <mjambor@suse.cz>
* ipa-prop.c (compute_complex_ancestor_jump_func): Work also if the
zero is the first phi parameter.
From-SVN: r167642
Diffstat (limited to 'gcc')
-rw-r--r-- | gcc/ChangeLog | 5 | ||||
-rw-r--r-- | gcc/ipa-prop.c | 10 |
2 files changed, 12 insertions, 3 deletions
diff --git a/gcc/ChangeLog b/gcc/ChangeLog index 7c380d3..839ffc6 100644 --- a/gcc/ChangeLog +++ b/gcc/ChangeLog @@ -1,5 +1,10 @@ 2010-12-09 Martin Jambor <mjambor@suse.cz> + * ipa-prop.c (compute_complex_ancestor_jump_func): Work also if the + zero is the first phi parameter. + +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 diff --git a/gcc/ipa-prop.c b/gcc/ipa-prop.c index 0e5a4b1..af5b261 100644 --- a/gcc/ipa-prop.c +++ b/gcc/ipa-prop.c @@ -460,11 +460,15 @@ compute_complex_ancestor_jump_func (struct ipa_node_params *info, tree tmp, parm, expr; int index, i; - if (gimple_phi_num_args (phi) != 2 - || !integer_zerop (PHI_ARG_DEF (phi, 1))) + if (gimple_phi_num_args (phi) != 2) return; - tmp = PHI_ARG_DEF (phi, 0); + if (integer_zerop (PHI_ARG_DEF (phi, 1))) + tmp = PHI_ARG_DEF (phi, 0); + else if (integer_zerop (PHI_ARG_DEF (phi, 0))) + tmp = PHI_ARG_DEF (phi, 1); + else + return; if (TREE_CODE (tmp) != SSA_NAME || SSA_NAME_IS_DEFAULT_DEF (tmp) || !POINTER_TYPE_P (TREE_TYPE (tmp)) |