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
This commit is contained in:
Richard Guenther 2012-01-23 11:59:53 +00:00 committed by Richard Biener
parent b31799f4e7
commit 191879f9c2
2 changed files with 13 additions and 0 deletions

View File

@ -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> 2012-01-23 Eric Botcazou <ebotcazou@adacore.com>
* tree-ssa-structalias.c (intra_create_variable_infos): Do not create * tree-ssa-structalias.c (intra_create_variable_infos): Do not create

View File

@ -3914,6 +3914,13 @@ decide_one_param_reduction (struct access *repr)
if (by_ref && repr->non_addressable) if (by_ref && repr->non_addressable)
return 0; 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 if (!by_ref || (!repr->grp_maybe_modified
&& !repr->grp_not_necessarilly_dereferenced)) && !repr->grp_not_necessarilly_dereferenced))
total_size += repr->size; total_size += repr->size;