diff options
Diffstat (limited to 'gcc/cfghooks.c')
-rw-r--r-- | gcc/cfghooks.c | 37 |
1 files changed, 7 insertions, 30 deletions
diff --git a/gcc/cfghooks.c b/gcc/cfghooks.c index 320036bc757..4a224243e32 100644 --- a/gcc/cfghooks.c +++ b/gcc/cfghooks.c @@ -146,10 +146,12 @@ verify_flow_info (void) error ("verify_flow_info: Wrong count of block %i", bb->index); err = 1; } - if (bb->frequency < 0) + /* FIXME: Graphite and SLJL and target code still tends to produce + edges with no probablity. */ + if (profile_status_for_fn (cfun) >= PROFILE_GUESSED + && !bb->count.initialized_p () && !flag_graphite && 0) { - error ("verify_flow_info: Wrong frequency of block %i %i", - bb->index, bb->frequency); + error ("verify_flow_info: Missing count of block %i", bb->index); err = 1; } @@ -164,7 +166,7 @@ verify_flow_info (void) /* FIXME: Graphite and SLJL and target code still tends to produce edges with no probablity. */ if (profile_status_for_fn (cfun) >= PROFILE_GUESSED - && !e->probability.initialized_p () && 0) + && !e->probability.initialized_p () && !flag_graphite && 0) { error ("Uninitialized probability of edge %i->%i", e->src->index, e->dest->index); @@ -315,7 +317,6 @@ dump_bb_for_graph (pretty_printer *pp, basic_block bb) /* TODO: Add pretty printer for counter. */ if (bb->count.initialized_p ()) pp_printf (pp, "COUNT:" "%" PRId64, bb->count.to_gcov_type ()); - pp_printf (pp, " FREQ:%i |", bb->frequency); pp_write_text_to_stream (pp); if (!(dump_flags & TDF_SLIM)) cfg_hooks->dump_bb_for_graph (pp, bb); @@ -513,7 +514,6 @@ split_block_1 (basic_block bb, void *i) return NULL; new_bb->count = bb->count; - new_bb->frequency = bb->frequency; new_bb->discriminator = bb->discriminator; if (dom_info_available_p (CDI_DOMINATORS)) @@ -626,7 +626,6 @@ split_edge (edge e) { basic_block ret; profile_count count = e->count (); - int freq = EDGE_FREQUENCY (e); edge f; bool irr = (e->flags & EDGE_IRREDUCIBLE_LOOP) != 0; struct loop *loop; @@ -640,7 +639,6 @@ split_edge (edge e) ret = cfg_hooks->split_edge (e); ret->count = count; - ret->frequency = freq; single_succ_edge (ret)->probability = profile_probability::always (); if (irr) @@ -869,7 +867,6 @@ make_forwarder_block (basic_block bb, bool (*redirect_edge_p) (edge), fallthru = split_block_after_labels (bb); dummy = fallthru->src; dummy->count = profile_count::zero (); - dummy->frequency = 0; bb = fallthru->dest; /* Redirect back edges we want to keep. */ @@ -879,10 +876,6 @@ make_forwarder_block (basic_block bb, bool (*redirect_edge_p) (edge), if (redirect_edge_p (e)) { - dummy->frequency += EDGE_FREQUENCY (e); - if (dummy->frequency > BB_FREQ_MAX) - dummy->frequency = BB_FREQ_MAX; - dummy->count += e->count (); ei_next (&ei); continue; @@ -1101,19 +1094,10 @@ duplicate_block (basic_block bb, edge e, basic_block after) new_bb->count = new_count; bb->count -= new_count; - new_bb->frequency = EDGE_FREQUENCY (e); - bb->frequency -= EDGE_FREQUENCY (e); - redirect_edge_and_branch_force (e, new_bb); - - if (bb->frequency < 0) - bb->frequency = 0; } else - { - new_bb->count = bb->count; - new_bb->frequency = bb->frequency; - } + new_bb->count = bb->count; set_bb_original (new_bb, bb); set_bb_copy (bb, new_bb); @@ -1463,13 +1447,6 @@ account_profile_record (struct profile_record *record, int after_pass) if (bb != ENTRY_BLOCK_PTR_FOR_FN (cfun) && profile_status_for_fn (cfun) != PROFILE_ABSENT) { - int sum = 0; - FOR_EACH_EDGE (e, ei, bb->preds) - sum += EDGE_FREQUENCY (e); - if (abs (sum - bb->frequency) > 100 - || (MAX (sum, bb->frequency) > 10 - && abs ((sum - bb->frequency) * 100 / (MAX (sum, bb->frequency) + 1)) > 10)) - record->num_mismatched_freq_in[after_pass]++; profile_count lsum = profile_count::zero (); FOR_EACH_EDGE (e, ei, bb->preds) lsum += e->count (); |