aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authordalej <dalej@138bc75d-0d04-0410-961f-82ee72b054a4>2005-08-22 20:58:08 +0000
committerdalej <dalej@138bc75d-0d04-0410-961f-82ee72b054a4>2005-08-22 20:58:08 +0000
commit3010b7df0f27d5d13d379ed00a3f59c87908a306 (patch)
tree810afac6565442b9b106d26e5d692a5af6dff0f6
parent8dcd6ff3afb94cca476531240a09bab0caa45b60 (diff)
2005-08-22 Dale Johannesen <dalej@apple.com>apple-200508-beta-branch
Radar 4216812 * tree-sra.c (scalarize_init): Add integer_copy handling. git-svn-id: https://gcc.gnu.org/svn/gcc/branches/apple-200508-beta-branch@103357 138bc75d-0d04-0410-961f-82ee72b054a4
-rw-r--r--gcc/ChangeLog.apple-ppc5
-rw-r--r--gcc/tree-sra.c9
2 files changed, 11 insertions, 3 deletions
diff --git a/gcc/ChangeLog.apple-ppc b/gcc/ChangeLog.apple-ppc
index 290e7482c79..f4dee607cc7 100644
--- a/gcc/ChangeLog.apple-ppc
+++ b/gcc/ChangeLog.apple-ppc
@@ -1,3 +1,8 @@
+2005-08-22 Dale Johannesen <dalej@apple.com>
+
+ Radar 4216812
+ * tree-sra.c (scalarize_init): Add integer_copy handling.
+
2005-08-09 Stuart Hastings <stuart@apple.com>
Radar 4209014
diff --git a/gcc/tree-sra.c b/gcc/tree-sra.c
index 39610e35140..d1fb4bdbecc 100644
--- a/gcc/tree-sra.c
+++ b/gcc/tree-sra.c
@@ -1438,7 +1438,7 @@ decide_block_copy (struct sra_elt *elt)
need to do a block copy or an element copy but we can use V_C_E
and create an integer variable which has the same mode as the
struct and this is only a copy.
- Copies bigger than DImode create problems later, so disallow them. */
+ Copies bigger than DImode create problems later, so disallow them. */
if (!elt->is_scalar && TYPE_MODE (elt->type) != BLKmode
&& elt->n_uses == 0 && elt->children == NULL
&& full_size <= GET_MODE_SIZE (DImode))
@@ -2037,9 +2037,12 @@ scalarize_init (struct sra_elt *lhs_elt, tree rhs, block_stmt_iterator *bsi)
/* CONSTRUCTOR is defined such that any member not mentioned is assigned
a zero value. Initialize the rest of the instantiated elements. */
- generate_element_zero (lhs_elt, &list);
+ /* APPLE LOCAL begin 4216812 */
+ if (lhs_elt->how_to_copy != integer_copy)
+ generate_element_zero (lhs_elt, &list);
- if (!result)
+ if (!result || lhs_elt->how_to_copy == integer_copy)
+ /* APPLE LOCAL end 4216812 */
{
/* If we failed to convert the entire initializer, then we must
leave the structure assignment in place and must load values