auto-profile.c (afdo_calculate_branch_prob): Break once has_sample is true.

* auto-profile.c (afdo_calculate_branch_prob): Break once has_sample is
	true.

From-SVN: r223762
This commit is contained in:
Aditya Kumar 2015-05-27 15:06:25 +00:00 committed by Jeff Law
parent ec09a694b3
commit 650a202b47
2 changed files with 10 additions and 2 deletions

View file

@ -1,5 +1,8 @@
2015-05-22 Aditya Kumar <hiraditya@msn.com>
* auto-profile.c (afdo_calculate_branch_prob): Break once has_sample
is true.
* statistics.c (statistics_fini_pass): Print pass name.
2015-05-27 Richard Biener <rguenther@suse.de>

View file

@ -1365,8 +1365,13 @@ afdo_calculate_branch_prob (bb_set *annotated_bb, edge_set *annotated_edge)
bool has_sample = false;
FOR_EACH_BB_FN (bb, cfun)
if (bb->count > 0)
has_sample = true;
{
if (bb->count > 0)
{
has_sample = true;
break;
}
}
if (!has_sample)
return;