aboutsummaryrefslogtreecommitdiff
path: root/gcc
diff options
context:
space:
mode:
authorJan Hubicka <hubicka@ucw.cz>2019-12-08 15:02:43 +0100
committerJan Hubicka <hubicka@gcc.gnu.org>2019-12-08 14:02:43 +0000
commita63574d7ed2b09a161ae9182936bd06cf5aef7b4 (patch)
treeac2a879cc437164e8df3beffcdabdd26631f11e8 /gcc
parentad74bc8ca4095e4bf58a4069105469e1c6a620f8 (diff)
downloadgcc-a63574d7ed2b09a161ae9182936bd06cf5aef7b4.zip
gcc-a63574d7ed2b09a161ae9182936bd06cf5aef7b4.tar.gz
gcc-a63574d7ed2b09a161ae9182936bd06cf5aef7b4.tar.bz2
Silence overactive sanity check with -fpartial-profile-training
do_estimate_edge_time tests that cached and real values matches. This test is not working precisely for global profiles because of roundoff issues when profile of clones is subtracted from profile of offline body. This is checked by presence of ipa counter. This breaks with partial profile training because we turn IPA profiles to local when they drop to 0. * ipa-inline-analysis.c (do_estimate_edge_time): Silence overactive sanity check. From-SVN: r279090
Diffstat (limited to 'gcc')
-rw-r--r--gcc/ChangeLog5
-rw-r--r--gcc/ipa-inline-analysis.c1
2 files changed, 6 insertions, 0 deletions
diff --git a/gcc/ChangeLog b/gcc/ChangeLog
index 7b2ae56..f051c23 100644
--- a/gcc/ChangeLog
+++ b/gcc/ChangeLog
@@ -1,5 +1,10 @@
2019-12-07 Jan Hubicka <hubicka@ucw.cz>
+ * ipa-inline-analysis.c (do_estimate_edge_time): Silence overactive
+ sanity check.
+
+2019-12-07 Jan Hubicka <hubicka@ucw.cz>
+
PR tree-optimization/92860
* common.opt (fprofile-reorder-functions, ftoplevel-reorder): Add
Optimization flag.
diff --git a/gcc/ipa-inline-analysis.c b/gcc/ipa-inline-analysis.c
index 75c6399..711b85b 100644
--- a/gcc/ipa-inline-analysis.c
+++ b/gcc/ipa-inline-analysis.c
@@ -209,6 +209,7 @@ do_estimate_edge_time (struct cgraph_edge *edge, sreal *ret_nonspec_time)
nonspec_time = e->entry.nonspec_time;
hints = e->entry.hints;
if (flag_checking
+ && !opt_for_fn (callee->decl, flag_profile_partial_training)
&& !callee->count.ipa_p ())
{
sreal chk_time, chk_nonspec_time;