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]

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;


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