Formerly the code was

  if (flag_auto_profile)
    read_autofdo_file ();
  else if (flag_branch_probabilities)
    read_counts_file ();

but with the AFDO re-org read_autofdo_file was delayed but the
guard not preserved.  The following rectifies this.

Boostrapped and tested on x86_64-unknown-linux-gnu.

OK?

Thanks,
Richard.

        * coverage.cc (coverage_init): Do not call read_counts_file
        if flag_auto_profile.
---
 gcc/coverage.cc | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/gcc/coverage.cc b/gcc/coverage.cc
index f2a095a1279..0f7fe09d865 100644
--- a/gcc/coverage.cc
+++ b/gcc/coverage.cc
@@ -1316,7 +1316,7 @@ coverage_init (const char *filename)
   strcpy (da_file_name + prefix_len + len, GCOV_DATA_SUFFIX);
 
   bbg_file_stamp = local_tick;
-  if (flag_branch_probabilities)
+  if (flag_branch_probabilities && !flag_auto_profile)
     read_counts_file ();
 
   /* Name of bbg file.  */
-- 
2.51.0

Reply via email to