aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorJan Hubicka <hubicka@ucw.cz>2019-12-08 17:57:20 +0100
committerJan Hubicka <hubicka@gcc.gnu.org>2019-12-08 16:57:20 +0000
commitf514d0199a8ff8a0275f7b1081196f35807216e8 (patch)
tree62ad09a1d0b93fe499a4d1c50c32e5ebbb57c8c6
parenta63574d7ed2b09a161ae9182936bd06cf5aef7b4 (diff)
downloadgcc-f514d0199a8ff8a0275f7b1081196f35807216e8.zip
gcc-f514d0199a8ff8a0275f7b1081196f35807216e8.tar.gz
gcc-f514d0199a8ff8a0275f7b1081196f35807216e8.tar.bz2
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
-rw-r--r--gcc/ChangeLog4
-rw-r--r--gcc/ipa-split.c3
2 files changed, 6 insertions, 1 deletions
diff --git a/gcc/ChangeLog b/gcc/ChangeLog
index f051c23..416e7d6 100644
--- a/gcc/ChangeLog
+++ b/gcc/ChangeLog
@@ -1,5 +1,9 @@
2019-12-07 Jan Hubicka <hubicka@ucw.cz>
+ * ipa-split.c (split_function): Preserve 0 tp_first_run.
+
+2019-12-07 Jan Hubicka <hubicka@ucw.cz>
+
* ipa-inline-analysis.c (do_estimate_edge_time): Silence overactive
sanity check.
diff --git a/gcc/ipa-split.c b/gcc/ipa-split.c
index 2310c1a..81a2448 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