From f514d0199a8ff8a0275f7b1081196f35807216e8 Mon Sep 17 00:00:00 2001 From: Jan Hubicka Date: Sun, 8 Dec 2019 17:57:20 +0100 Subject: [PATCH] Fix tp_first_run update in split_function. The value 0 in tp_first_run is special meaing that profile is unknown. We should not set it to 1. * ipa-split.c (split_function): Preserve 0 tp_first_run. From-SVN: r279091 --- gcc/ChangeLog | 4 ++++ gcc/ipa-split.c | 3 ++- 2 files changed, 6 insertions(+), 1 deletion(-) diff --git a/gcc/ChangeLog b/gcc/ChangeLog index f051c233c77..416e7d6f543 100644 --- a/gcc/ChangeLog +++ b/gcc/ChangeLog @@ -1,3 +1,7 @@ +2019-12-07 Jan Hubicka + + * ipa-split.c (split_function): Preserve 0 tp_first_run. + 2019-12-07 Jan Hubicka * ipa-inline-analysis.c (do_estimate_edge_time): Silence overactive diff --git a/gcc/ipa-split.c b/gcc/ipa-split.c index 2310c1abd0e..81a2448cc28 100644 --- a/gcc/ipa-split.c +++ b/gcc/ipa-split.c @@ -1369,7 +1369,8 @@ split_function (basic_block return_bb, class split_point *split_point, /* 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 -- 2.30.2