gimplify.c (gimplify_init_constructor): Do a block move for very small objects as well.

* gimplify.c (gimplify_init_constructor): Do a block move for very
	small objects as well.

From-SVN: r187498
This commit is contained in:
Eric Botcazou 2012-05-15 07:21:37 +00:00 committed by Eric Botcazou
parent aa44c80c8f
commit f301837ea3
2 changed files with 10 additions and 1 deletions

View File

@ -1,3 +1,8 @@
2012-05-15 Eric Botcazou <ebotcazou@adacore.com>
* gimplify.c (gimplify_init_constructor): Do a block move for very
small objects as well.
2012-05-15 Bernd Schmidt <bernds@codesourcery.com>
* ira.c (find_moveable_pseudos): Skip registers whose

View File

@ -4033,9 +4033,13 @@ gimplify_init_constructor (tree *expr_p, gimple_seq *pre_p, gimple_seq *post_p,
else
align = TYPE_ALIGN (type);
/* Do a block move either if the size is so small as to make
each individual move a sub-unit move on average, or if it
is so large as to make individual moves inefficient. */
if (size > 0
&& num_nonzero_elements > 1
&& !can_move_by_pieces (size, align))
&& (size < num_nonzero_elements
|| !can_move_by_pieces (size, align)))
{
if (notify_temp_creation)
return GS_ERROR;