cgraphclones.c (cgraph_node::create_clone): Only localize toplevel functions, not...
authorJan Hubicka <hubicka@ucw.cz>
Fri, 6 Dec 2019 08:51:43 +0000 (09:51 +0100)
committerJan Hubicka <hubicka@gcc.gnu.org>
Fri, 6 Dec 2019 08:51:43 +0000 (08:51 +0000)
* cgraphclones.c (cgraph_node::create_clone): Only localize toplevel
functions, not inline clones.

From-SVN: r279036

gcc/ChangeLog
gcc/cgraphclones.c

index 9108027b334bd188b17c3624e7f3c9cbca5a06dc..beac212417d9022c515876558c7ea0a61577d63b 100644 (file)
@@ -1,3 +1,8 @@
+2019-12-06  Jan Hubicka  <hubicka@ucw.cz>
+
+       * cgraphclones.c (cgraph_node::create_clone): Only localize toplevel
+       functions, not inline clones.
+
 2019-12-06  Jan Hubicka  <hubicka@ucw.cz>
 
        * cfgexpand.c (expand_debug_expr): Do not ICE on SAD_EXPR.
index f2dfb4e2d679e58e922a15ec26b3c3d9db9dff55..dbdeb4510b49bcf40ce234fc9e287ee1e89081f4 100644 (file)
@@ -450,7 +450,8 @@ cgraph_node::create_clone (tree new_decl, profile_count prof_count,
       && opt_for_fn (decl, flag_profile_partial_training)
       && nonzero
       && count.ipa_p ()
-      && !count.ipa ().nonzero_p ())
+      && !count.ipa ().nonzero_p ()
+      && !inlined_to)
     localize_profile (this);
 
   if (!new_inlined_to)