Do estimate frequnecies even with profile feedback
Jan Hubicka
jh@suse.cz
Wed Dec 12 06:52:00 GMT 2001
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;
More information about the Gcc-patches
mailing list