aboutsummaryrefslogtreecommitdiff
path: root/gcc/gimplify.c
diff options
context:
space:
mode:
authorJason Merrill <jason@redhat.com>2004-06-10 23:26:31 -0400
committerJason Merrill <jason@gcc.gnu.org>2004-06-10 23:26:31 -0400
commit3bcb4e37d15296c7aad59f8591876ccfa28f6c31 (patch)
tree286dfd310c69cb69eb51a600c9b4516f6e965fb7 /gcc/gimplify.c
parent3100d647250b4209a601763e7887936d25899f3f (diff)
downloadgcc-3bcb4e37d15296c7aad59f8591876ccfa28f6c31.zip
gcc-3bcb4e37d15296c7aad59f8591876ccfa28f6c31.tar.gz
gcc-3bcb4e37d15296c7aad59f8591876ccfa28f6c31.tar.bz2
gimplify.c (gimplify_modify_expr): Don't force a temporary of an aggregate_value_p type.
* gimplify.c (gimplify_modify_expr): Don't force a temporary of an aggregate_value_p type. From-SVN: r82959
Diffstat (limited to 'gcc/gimplify.c')
-rw-r--r--gcc/gimplify.c16
1 files changed, 10 insertions, 6 deletions
diff --git a/gcc/gimplify.c b/gcc/gimplify.c
index c25a891..a4b9c70 100644
--- a/gcc/gimplify.c
+++ b/gcc/gimplify.c
@@ -2493,12 +2493,16 @@ gimplify_modify_expr (tree *expr_p, tree *pre_p, tree *post_p, bool want_value)
FIXME this should be handled by the is_gimple_rhs predicate. */
- if (TREE_CODE (*from_p) == CALL_EXPR
- || (flag_non_call_exceptions && tree_could_trap_p (*from_p))
- /* If we're dealing with a renamable type, either source or dest
- must be a renamed variable. */
- || (is_gimple_reg_type (TREE_TYPE (*from_p))
- && !is_gimple_reg (*to_p)))
+ if (aggregate_value_p (TREE_TYPE (*from_p), NULL_TREE))
+ /* Don't force a temp of a large aggregate type; the copy could be
+ arbitrarily expensive. Instead we will generate a V_MAY_DEF for
+ the assignment. */;
+ else if (TREE_CODE (*from_p) == CALL_EXPR
+ || (flag_non_call_exceptions && tree_could_trap_p (*from_p))
+ /* If we're dealing with a renamable type, either source or dest
+ must be a renamed variable. */
+ || (is_gimple_reg_type (TREE_TYPE (*from_p))
+ && !is_gimple_reg (*to_p)))
gimplify_expr (from_p, pre_p, post_p, is_gimple_val, fb_rvalue);
/* If the value being copied is of variable width, expose the length