diff options
author | Richard Guenther <rguenther@suse.de> | 2012-01-23 11:59:53 +0000 |
---|---|---|
committer | Richard Biener <rguenth@gcc.gnu.org> | 2012-01-23 11:59:53 +0000 |
commit | 191879f9c2ca1c70d34acf91337bdf7bc3229eed (patch) | |
tree | d7ac089a19b8b5ac63d48e21b3bf6072f31e9c4f /gcc | |
parent | b31799f4e7a73997775b23d2619b9ae147a226b1 (diff) | |
download | gcc-191879f9c2ca1c70d34acf91337bdf7bc3229eed.zip gcc-191879f9c2ca1c70d34acf91337bdf7bc3229eed.tar.gz gcc-191879f9c2ca1c70d34acf91337bdf7bc3229eed.tar.bz2 |
re PR middle-end/51895 (ICE in simplify_subreg)
2012-01-23 Richard Guenther <rguenther@suse.de>
PR tree-optimization/51895
* tree-sra.c (decide_one_param_reduction): Avoid sub-optimal
parameter decomposition into BLKmode components.
From-SVN: r183429
Diffstat (limited to 'gcc')
-rw-r--r-- | gcc/ChangeLog | 6 | ||||
-rw-r--r-- | gcc/tree-sra.c | 7 |
2 files changed, 13 insertions, 0 deletions
diff --git a/gcc/ChangeLog b/gcc/ChangeLog index b953cd0..c028087 100644 --- a/gcc/ChangeLog +++ b/gcc/ChangeLog @@ -1,3 +1,9 @@ +2012-01-23 Richard Guenther <rguenther@suse.de> + + PR tree-optimization/51895 + * tree-sra.c (decide_one_param_reduction): Avoid sub-optimal + parameter decomposition into BLKmode components. + 2012-01-23 Eric Botcazou <ebotcazou@adacore.com> * tree-ssa-structalias.c (intra_create_variable_infos): Do not create diff --git a/gcc/tree-sra.c b/gcc/tree-sra.c index 9c2d138..f4146b2 100644 --- a/gcc/tree-sra.c +++ b/gcc/tree-sra.c @@ -3914,6 +3914,13 @@ decide_one_param_reduction (struct access *repr) if (by_ref && repr->non_addressable) return 0; + /* Do not decompose a non-BLKmode param in a way that would + create BLKmode params. Especially for by-reference passing + (thus, pointer-type param) this is hardly worthwhile. */ + if (DECL_MODE (parm) != BLKmode + && TYPE_MODE (repr->type) == BLKmode) + return 0; + if (!by_ref || (!repr->grp_maybe_modified && !repr->grp_not_necessarilly_dereferenced)) total_size += repr->size; |