OSDN Git Service

PR tree-opt/19042
authorrth <rth@138bc75d-0d04-0410-961f-82ee72b054a4>
Sat, 1 Jan 2005 02:38:06 +0000 (02:38 +0000)
committerrth <rth@138bc75d-0d04-0410-961f-82ee72b054a4>
Sat, 1 Jan 2005 02:38:06 +0000 (02:38 +0000)
        * tree-sra.c (decide_block_copy): Force use_block_copy false
        for complex values.

git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/trunk@92782 138bc75d-0d04-0410-961f-82ee72b054a4

gcc/ChangeLog
gcc/tree-sra.c

index ebe2b7d..983ad2c 100644 (file)
@@ -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.
index 1c1739b..bb98a8a 100644 (file)
@@ -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;