diff mbox series

Fix tp_first_run update in split_function

Message ID 20191208165816.rnnldowytoa3xafs@kam.mff.cuni.cz
State New
Headers show
Series Fix tp_first_run update in split_function | expand

Commit Message

Jan Hubicka Dec. 8, 2019, 4:58 p.m. UTC
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.
diff mbox series

Patch

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