This is the mail archive of the gcc-patches@gcc.gnu.org mailing list for the GCC project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

Re: PATCH RFC: Don't print branches never executed in profile.c


Ian Lance Taylor <iant@google.com> writes:

> There is code in profile.c to print the number of branches which were
> never executed.  However, it was broken by this patch:
>
> Wed Nov 21 12:38:37 CET 2001  Jan Hubicka
>
> 	* profile.c (compute_branch_probabilites):  Compute probabilities
> 	for entry/exit edges; estimate probabilities for zero counts.
>
> which accidentally changed the critical line to
>
>   num_branches++, num_never_executed;
>
> so that num_never_executed is always zero.
>
> Since nobody has noticed this brokenness for more than seven years, I
> think we should simply remove num_never_executed.
>
> Does anybody object to this patch?
>
> Ian
>
>
> 2009-06-16  Ian Lance Taylor  <iant@google.com>
>
> 	* profile.c (total_num_never_executed): Don't define.
> 	(compute_branch_probabilities): Don't count or print
> 	num_never_executed.
> 	(init_branch_prob): Don't set total_num_never_executed.
> 	(end_branch_prob): Don't print total_num_never_executed.

I received no reply.  I have committed this patch.

Ian


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]