This is the mail archive of the
gcc-patches@gcc.gnu.org
mailing list for the GCC project.
Do estimate frequnecies even with profile feedback
- From: Jan Hubicka <jh at suse dot cz>
- To: gcc-patches at gcc dot gnu dot org, gcc-pdo at atrey dot karlin dot mff dot cuni dot cz
- Date: Wed, 12 Dec 2001 15:52:35 +0100
- Subject: Do estimate frequnecies even with profile feedback
Hi,
this patch avoids overpesimizing code that has not been executed in trial
run.
Wed Dec 12 15:50:18 CET 2001 Jan Hubicka <jh@suse.cz>
* predict.c (estimate_bb_frequencies): Do estimation even when
feedback is available but given function is not benchmarked.
Index: predict.c
===================================================================
RCS file: /cvs/gcc/egcs/gcc/predict.c,v
retrieving revision 1.44.2.12
diff -c -3 -p -r1.44.2.12 predict.c
*** predict.c 2001/12/12 13:23:16 1.44.2.12
--- predict.c 2001/12/12 14:50:11
*************** estimate_bb_frequencies (loops)
*** 1056,1062 ****
double freq_max = 0;
mark_dfs_back_edges ();
! if (flag_branch_probabilities)
{
counts_to_freqs ();
return;
--- 1056,1066 ----
double freq_max = 0;
mark_dfs_back_edges ();
!
! /* In case we do have profile feedback available, do just scale it to
! frequencies. In case we don't, or the function has not been executed
! in trial run, estimate. */
! if (flag_branch_probabilities && ENTRY_BLOCK_PTR->succ->count)
{
counts_to_freqs ();
return;