]> git.ipfire.org Git - thirdparty/gcc.git/commitdiff
Silence overactive sanity check with -fpartial-profile-training
authorJan Hubicka <hubicka@ucw.cz>
Sun, 8 Dec 2019 14:02:43 +0000 (15:02 +0100)
committerJan Hubicka <hubicka@gcc.gnu.org>
Sun, 8 Dec 2019 14:02:43 +0000 (14:02 +0000)
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

gcc/ChangeLog
gcc/ipa-inline-analysis.c

index 7b2ae564d4729cd27bf9f8aaf2ee8ed830a5c8b4..f051c233c77196e0a5b1a3ce37d6e32a034b3627 100644 (file)
@@ -1,3 +1,8 @@
+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
index 75c6399d35d4cda7e79ec6a7b9a3f5a06ed86522..711b85bd1a94354641e3137c90fa7fcf693b7805 100644 (file)
@@ -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;