aboutsummaryrefslogtreecommitdiff
path: root/gcc/tree-sra.c
diff options
context:
space:
mode:
authorRichard Henderson <rth@redhat.com>2005-01-01 02:38:06 +0000
committerRichard Henderson <rth@redhat.com>2005-01-01 02:38:06 +0000
commitdd9c22cd5a151a11d2cca0c6599f6417c6ae3061 (patch)
tree788b2b3b0cc3fcdc2a9e07e5d26a9c796719f883 /gcc/tree-sra.c
parent3b695c820a1567164479e5b660cc3ea4d6445b5a (diff)
PR tree-opt/19042
* tree-sra.c (decide_block_copy): Force use_block_copy false for complex values. git-svn-id: https://gcc.gnu.org/svn/gcc/trunk@92782 138bc75d-0d04-0410-961f-82ee72b054a4
Diffstat (limited to 'gcc/tree-sra.c')
-rw-r--r--gcc/tree-sra.c7
1 files changed, 6 insertions, 1 deletions
diff --git a/gcc/tree-sra.c b/gcc/tree-sra.c
index 1c1739b18b2..bb98a8afe6c 100644
--- a/gcc/tree-sra.c
+++ b/gcc/tree-sra.c
@@ -1293,10 +1293,15 @@ decide_block_copy (struct sra_elt *elt)
tree size_tree = TYPE_SIZE_UNIT (elt->type);
bool use_block_copy = true;
+ /* Tradeoffs for COMPLEX types pretty much always make it better
+ to go ahead and split the components. */
+ if (TREE_CODE (elt->type) == COMPLEX_TYPE)
+ use_block_copy = false;
+
/* Don't bother trying to figure out the rest if the structure is
so large we can't do easy arithmetic. This also forces block
copies for variable sized structures. */
- if (host_integerp (size_tree, 1))
+ else if (host_integerp (size_tree, 1))
{
unsigned HOST_WIDE_INT full_size, inst_size = 0;
unsigned int inst_count;