diff options
author | Richard Henderson <rth@redhat.com> | 2004-12-31 18:38:06 -0800 |
---|---|---|
committer | Richard Henderson <rth@gcc.gnu.org> | 2004-12-31 18:38:06 -0800 |
commit | 8e1d2e8278cc2bed80ad1a1564cee131996b6129 (patch) | |
tree | 788b2b3b0cc3fcdc2a9e07e5d26a9c796719f883 /gcc | |
parent | 78e0d62b95e1706a1243f3067da2e487c2d4a7e9 (diff) | |
download | gcc-8e1d2e8278cc2bed80ad1a1564cee131996b6129.zip gcc-8e1d2e8278cc2bed80ad1a1564cee131996b6129.tar.gz gcc-8e1d2e8278cc2bed80ad1a1564cee131996b6129.tar.bz2 |
re PR tree-optimization/19042 (Complex types are not SRA all the time.)
PR tree-opt/19042
* tree-sra.c (decide_block_copy): Force use_block_copy false
for complex values.
From-SVN: r92782
Diffstat (limited to 'gcc')
-rw-r--r-- | gcc/ChangeLog | 6 | ||||
-rw-r--r-- | gcc/tree-sra.c | 7 |
2 files changed, 12 insertions, 1 deletions
diff --git a/gcc/ChangeLog b/gcc/ChangeLog index ebe2b7d..983ad2c 100644 --- a/gcc/ChangeLog +++ b/gcc/ChangeLog @@ -1,5 +1,11 @@ 2004-12-31 Richard Henderson <rth@redhat.com> + PR tree-opt/19042 + * tree-sra.c (decide_block_copy): Force use_block_copy false + for complex values. + +2004-12-31 Richard Henderson <rth@redhat.com> + PR middle-end/17799 * function.c (use_register_for_decl): Check DECL_IGNORED_P instead of DECL_ARTIFICIAL. diff --git a/gcc/tree-sra.c b/gcc/tree-sra.c index 1c1739b..bb98a8a 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; |