From 688b6bc6943dc52195ca8748fdb741a4ad719bc0 Mon Sep 17 00:00:00 2001 From: hubicka Date: Tue, 14 Nov 2017 09:18:35 +0000 Subject: * auto-profile.c (afdo_annotate_cfg): Use update_max_bb_count. * cgraphunit.c (cgraph_node::expand_thunk): Use update_max_bb_count. * ipa-utils.c (ipa_merge_profiles): Use update_max_bb_count. * lto-streamer-in.c (input_function): Use update_max_bb_count. * omp-expand.c (expand_omp_taskreg): Use update_max_bb_count. * predict.c (maybe_hot_frequency_p): Inline to ... (maybe_hot_count_p): ... here; rewrite to counts. (counts_to_freqs): Rename to ... (update_max_bb_count): ... this one. (expensive_function_p): Use counts. (estimate_bb_frequencies): Update. (rebuild_frequencies): Update. * predict.h (counts_to_freqs): Rename to ... (update_max_bb_count): ... this one. * profile.c (compute_branch_probabilities): Add debug info * tree-inline.c (expand_call_inline): Update debug info. (optimize_inline_calls): Use update_max_bb_count.. (tree_function_versioning): Use update_max_bb_count.. * value-prof.c (gimple_value_profile_transformations): Do not use update_max_bb_count. git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/trunk@254725 138bc75d-0d04-0410-961f-82ee72b054a4 --- gcc/profile.c | 8 ++++++-- 1 file changed, 6 insertions(+), 2 deletions(-) (limited to 'gcc/profile.c') diff --git a/gcc/profile.c b/gcc/profile.c index 2b30a9e6754..11170066cae 100644 --- a/gcc/profile.c +++ b/gcc/profile.c @@ -497,7 +497,11 @@ compute_branch_probabilities (unsigned cfg_checksum, unsigned lineno_checksum) /* Very simple sanity checks so we catch bugs in our profiling code. */ if (!profile_info) - return; + { + if (dump_file) + fprintf (dump_file, "Profile info is missing; giving up\n"); + return; + } bb_gcov_counts.safe_grow_cleared (last_basic_block_for_fn (cfun)); edge_gcov_counts = new hash_map; @@ -805,7 +809,7 @@ compute_branch_probabilities (unsigned cfg_checksum, unsigned lineno_checksum) delete edge_gcov_counts; edge_gcov_counts = NULL; - counts_to_freqs (); + update_max_bb_count (); if (dump_file) { -- cgit v1.2.1