]> git.ipfire.org Git - thirdparty/gcc.git/commitdiff
backport: omp-simd-clone.c (simd_clone_adjust_return_type): Remove call to build_dist...
authorSteve Ellcey <sellcey@marvell.com>
Thu, 15 Aug 2019 20:41:47 +0000 (20:41 +0000)
committerSteve Ellcey <sje@gcc.gnu.org>
Thu, 15 Aug 2019 20:41:47 +0000 (20:41 +0000)
2019-08-15  Steve Ellcey  <sellcey@marvell.com>

Backport from mainline
2019-08-02  Steve Ellcey  <sellcey@marvell.com>

* omp-simd-clone.c (simd_clone_adjust_return_type): Remove call to
build_distinct_type_copy.
(simd_clone_adjust_argument_types): Ditto.
(simd_clone_adjust): Call build_distinct_type_copy here.
(expand_simd_clones): Ditto.

From-SVN: r274548

gcc/ChangeLog
gcc/omp-simd-clone.c

index 1f5ac480c3e2a3f581efe3b759e1c0c4f8c012a0..4b8c1d1698f7c1fb0e5b28daca62511ae8107a73 100644 (file)
@@ -1,3 +1,14 @@
+2019-08-15  Steve Ellcey  <sellcey@marvell.com>
+
+       Backport from mainline
+       2019-08-02  Steve Ellcey  <sellcey@marvell.com>
+
+       * omp-simd-clone.c (simd_clone_adjust_return_type): Remove call to
+       build_distinct_type_copy.
+       (simd_clone_adjust_argument_types): Ditto.
+       (simd_clone_adjust): Call build_distinct_type_copy here.
+       (expand_simd_clones): Ditto.
+
 2019-08-15  Richard Biener  <rguenther@suse.de>
 
        PR tree-optimization/91445
index 472e2025e19b5ccc2837593f23fce190b0da8e72..845443efc594ab256e00126e20a063d5be7fe8d3 100644 (file)
@@ -498,7 +498,6 @@ simd_clone_adjust_return_type (struct cgraph_node *node)
   /* Adjust the function return type.  */
   if (orig_rettype == void_type_node)
     return NULL_TREE;
-  TREE_TYPE (fndecl) = build_distinct_type_copy (TREE_TYPE (fndecl));
   t = TREE_TYPE (TREE_TYPE (fndecl));
   if (INTEGRAL_TYPE_P (t) || POINTER_TYPE_P (t))
     veclen = node->simdclone->vecsize_int;
@@ -724,11 +723,7 @@ simd_clone_adjust_argument_types (struct cgraph_node *node)
          else
            new_reversed = void_list_node;
        }
-
-      tree new_type = build_distinct_type_copy (TREE_TYPE (node->decl));
-      TYPE_ARG_TYPES (new_type) = new_reversed;
-      TREE_TYPE (node->decl) = new_type;
-
+      TYPE_ARG_TYPES (TREE_TYPE (node->decl)) = new_reversed;
       adjustments.release ();
     }
   args.release ();
@@ -1164,6 +1159,7 @@ simd_clone_adjust (struct cgraph_node *node)
 {
   push_cfun (DECL_STRUCT_FUNCTION (node->decl));
 
+  TREE_TYPE (node->decl) = build_distinct_type_copy (TREE_TYPE (node->decl));
   targetm.simd_clone.adjust (node);
 
   tree retval = simd_clone_adjust_return_type (node);
@@ -1737,6 +1733,8 @@ expand_simd_clones (struct cgraph_node *node)
            simd_clone_adjust (n);
          else
            {
+             TREE_TYPE (n->decl)
+               = build_distinct_type_copy (TREE_TYPE (n->decl));
              targetm.simd_clone.adjust (n);
              simd_clone_adjust_return_type (n);
              simd_clone_adjust_argument_types (n);