diff options
author | law <law@138bc75d-0d04-0410-961f-82ee72b054a4> | 2015-05-27 15:06:25 +0000 |
---|---|---|
committer | law <law@138bc75d-0d04-0410-961f-82ee72b054a4> | 2015-05-27 15:06:25 +0000 |
commit | f39425255ce21611a7dab7a52b822e2e18e89231 (patch) | |
tree | f63d4c6fc8d19c9d8ff53286bf786bef846c7c20 /gcc/auto-profile.c | |
parent | 53d041901ca2523b04a21c53dd46ad50e9b77493 (diff) | |
download | gcc-f39425255ce21611a7dab7a52b822e2e18e89231.tar.gz |
* auto-profile.c (afdo_calculate_branch_prob): Break once has_sample is
true.
git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/trunk@223762 138bc75d-0d04-0410-961f-82ee72b054a4
Diffstat (limited to 'gcc/auto-profile.c')
-rw-r--r-- | gcc/auto-profile.c | 9 |
1 files changed, 7 insertions, 2 deletions
diff --git a/gcc/auto-profile.c b/gcc/auto-profile.c index 55dd8d18483..1936487242f 100644 --- a/gcc/auto-profile.c +++ b/gcc/auto-profile.c @@ -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; |