cgraphclones.c (build_function_type_skip_args): Do not make new type variant of old.
authorJan Hubicka <hubicka@ucw.cz>
Thu, 2 Oct 2014 07:07:04 +0000 (09:07 +0200)
committerJan Hubicka <hubicka@gcc.gnu.org>
Thu, 2 Oct 2014 07:07:04 +0000 (07:07 +0000)
* cgraphclones.c (build_function_type_skip_args): Do not make new
type variant of old.

From-SVN: r215795

gcc/ChangeLog
gcc/cgraphclones.c

index e07c960ade66583d112817cc67a89ce5b737ebdc..860004054d4104156031eff7e6fc0738c1630b9f 100644 (file)
@@ -1,3 +1,8 @@
+2014-10-01  Jan Hubicka  <hubicka@ucw.cz>
+
+       * cgraphclones.c (build_function_type_skip_args): Do not make new
+       type variant of old. 
+
 2014-10-01  Jan Hubicka  <hubicka@ucw.cz>
 
        * ipa-prop.h (ipa_get_controlled_uses): Add hack to avoid ICE
index 38d92f53e836d8993b03acbbb40f1d831673c6d6..37b234f78911671392618559e6a11efece770cd3 100644 (file)
@@ -177,7 +177,7 @@ build_function_type_skip_args (tree orig_type, bitmap args_to_skip,
                               bool skip_return)
 {
   tree new_type = NULL;
-  tree args, new_args = NULL, t;
+  tree args, new_args = NULL;
   tree new_reversed;
   int i = 0;
 
@@ -218,22 +218,6 @@ build_function_type_skip_args (tree orig_type, bitmap args_to_skip,
   if (skip_return)
     TREE_TYPE (new_type) = void_type_node;
 
-  /* This is a new type, not a copy of an old type.  Need to reassociate
-     variants.  We can handle everything except the main variant lazily.  */
-  t = TYPE_MAIN_VARIANT (orig_type);
-  if (t != orig_type)
-    {
-      t = build_function_type_skip_args (t, args_to_skip, skip_return);
-      TYPE_MAIN_VARIANT (new_type) = t;
-      TYPE_NEXT_VARIANT (new_type) = TYPE_NEXT_VARIANT (t);
-      TYPE_NEXT_VARIANT (t) = new_type;
-    }
-  else
-    {
-      TYPE_MAIN_VARIANT (new_type) = new_type;
-      TYPE_NEXT_VARIANT (new_type) = NULL;
-    }
-
   return new_type;
 }