Message ID | 1432649242-32105-1-git-send-email-hiraditya@msn.com |
---|---|
State | New |
Headers | show |
On 05/26/2015 08:07 AM, Aditya Kumar wrote: > gcc/ChangeLog: > > 2015-05-26 Aditya Kumar <hiraditya@msn.com> > > * auto-profile.c (afdo_calculate_branch_prob): Break once has_sample is true. OK. Please install onto the trunk. Thanks, jeff
I don't have commit access. I would appreciate if someone does that for me. Thanks, -Aditya ---------------------------------------- > Date: Tue, 26 May 2015 08:14:41 -0600 > From: law@redhat.com > To: hiraditya@msn.com; gcc-patches@gcc.gnu.org > Subject: Re: [PATCH] Break when has_sample is true > > On 05/26/2015 08:07 AM, Aditya Kumar wrote: >> gcc/ChangeLog: >> >> 2015-05-26 Aditya Kumar <hiraditya@msn.com> >> >> * auto-profile.c (afdo_calculate_branch_prob): Break once has_sample is true. > OK. Please install onto the trunk. > > Thanks, > jeff >
On 05/26/2015 08:32 AM, Aditya K wrote: > > I don't have commit access. I would appreciate if someone does that for me. > > Thanks, > -Aditya > > ---------------------------------------- >> Date: Tue, 26 May 2015 08:14:41 -0600 >> From: law@redhat.com >> To: hiraditya@msn.com; gcc-patches@gcc.gnu.org >> Subject: Re: [PATCH] Break when has_sample is true >> >> On 05/26/2015 08:07 AM, Aditya Kumar wrote: >>> gcc/ChangeLog: >>> >>> 2015-05-26 Aditya Kumar <hiraditya@msn.com> >>> >>> * auto-profile.c (afdo_calculate_branch_prob): Break once has_sample is true. >> OK. Please install onto the trunk. Installed on the trunk after a bootstrap and regression test run on x86-linux-gnu. jeff
diff --git a/gcc/auto-profile.c b/gcc/auto-profile.c index 55dd8d1..1936487 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;