public inbox for gcc-patches@gcc.gnu.org
 help / color / mirror / Atom feed
* Fix tp_first_run update in split_function
@ 2019-12-08 16:58 Jan Hubicka
  0 siblings, 0 replies; only message in thread
From: Jan Hubicka @ 2019-12-08 16:58 UTC (permalink / raw)
  To: gcc-patches

Hi,
the value 0 in tp_first_run is special meaing that profile is unknown.  We
should not set it to 1.

Bootstrapped/regtested x86_64-linux, comitted.

	* ipa-split.c (split_function): Preserve 0 tp_first_run.
Index: ipa-split.c
===================================================================
--- ipa-split.c	(revision 279076)
+++ ipa-split.c	(working copy)
@@ -1369,7 +1369,8 @@ split_function (basic_block return_bb, c
 
 
   /* Let's take a time profile for splitted function.  */
-  node->tp_first_run = cur_node->tp_first_run + 1;
+  if (cur_node->tp_first_run)
+    node->tp_first_run = cur_node->tp_first_run + 1;
 
   /* For usual cloning it is enough to clear builtin only when signature
      changes.  For partial inlining we however cannot expect the part

^ permalink raw reply	[flat|nested] only message in thread

only message in thread, other threads:[~2019-12-08 16:58 UTC | newest]

Thread overview: (only message) (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2019-12-08 16:58 Fix tp_first_run update in split_function Jan Hubicka

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).