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]

rtlopt merge part 11 - trace selection in sched_ebb


Hi,
this patch makes sched-ebb.c trace selection to match one in tracer, so things
are consistent.  This brings huge speedup for athlon with trace scheduling, but
I have no oportunity to test it on IA-64 where situation may be different.

The main difference now is that in order to continue in trace, the probability
must be strictly greater than 50%, so we don't schedule over branches we didn't
predicted in any direction.
With profile feedback we require the probability to be greater than 80% that is
the case for most branches anyway.

I can't benchmark on Itanium, but I would be interested in knowing whether this
affect performance positivly or negativly in profile/nonprofile mode.  In the
case of negative impact, I think we should modify the default inside ia64.c as
current default will probably work best for most of current architectures.

Honza

Wed Feb 19 13:36:37 CET 2003  Jan Hubicka  <jh at suse dot cz>
	* sched-ebb.c: Include params.h and profile.h
	(schedule_ebbs):  Use tracer parameters to discover superblocks
	* Makefile.in (sched-ebb.o):  Add dependencies.

*** sched-ebb.c	Tue Feb 11 13:33:38 2003
--- /aux/hubicka/rtlopt/gcc/gcc/sched-ebb.c	Tue Feb 18 14:38:22 2003
*************** Software Foundation, 59 Temple Place - S
*** 39,44 ****
--- 39,46 ----
  #include "toplev.h"
  #include "recog.h"
  #include "cfglayout.h"
+ #include "params.h"
+ #include "profile.h"
  #include "sched-int.h"
  #include "target.h"
  
*************** schedule_ebbs (dump_file)
*** 430,435 ****
--- 432,444 ----
       FILE *dump_file;
  {
    basic_block bb;
+   int probability_cutoff;
+ 
+   if (profile_info.count_profiles_merged && flag_branch_probabilities)
+     probability_cutoff = PARAM_VALUE (TRACER_MIN_BRANCH_PROBABILITY_FEEDBACK);
+   else
+     probability_cutoff = PARAM_VALUE (TRACER_MIN_BRANCH_PROBABILITY);
+   probability_cutoff = REG_BR_PROB_BASE / 100 * probability_cutoff;
  
    /* Taking care of this degenerate case makes the rest of
       this code simpler.  */
*************** schedule_ebbs (dump_file)
*** 461,467 ****
  	      break;
  	  if (! e)
  	    break;
! 	  if (e->probability < REG_BR_PROB_BASE / 2)
  	    break;
  	  bb = bb->next_bb;
  	}
--- 470,476 ----
  	      break;
  	  if (! e)
  	    break;
! 	  if (e->probability <= probability_cutoff)
  	    break;
  	  bb = bb->next_bb;
  	}
Index: Makefile.in
===================================================================
RCS file: /cvs/gcc/gcc/gcc/Makefile.in,v
retrieving revision 1.996
diff -c -3 -p -r1.996 Makefile.in
*** Makefile.in	16 Feb 2003 00:58:29 -0000	1.996
--- Makefile.in	19 Feb 2003 12:36:07 -0000
*************** sched-rgn.o : sched-rgn.c $(CONFIG_H) $(
*** 1673,1679 ****
     $(INSN_ATTR_H) toplev.h $(RECOG_H) except.h $(TM_P_H) $(TARGET_H)
  sched-ebb.o : sched-ebb.c $(CONFIG_H) $(SYSTEM_H) coretypes.h $(TM_H) $(RTL_H) \
     sched-int.h $(BASIC_BLOCK_H) $(REGS_H) hard-reg-set.h flags.h insn-config.h function.h \
!    $(INSN_ATTR_H) toplev.h $(RECOG_H) except.h $(TM_P_H)
  sched-vis.o : sched-vis.c $(CONFIG_H) $(SYSTEM_H) coretypes.h $(TM_H) $(RTL_H) \
     sched-int.h hard-reg-set.h $(BASIC_BLOCK_H) $(INSN_ATTR_H) $(REGS_H) $(TM_P_H) \
     $(TARGET_H) real.h
--- 1673,1679 ----
     $(INSN_ATTR_H) toplev.h $(RECOG_H) except.h $(TM_P_H) $(TARGET_H)
  sched-ebb.o : sched-ebb.c $(CONFIG_H) $(SYSTEM_H) coretypes.h $(TM_H) $(RTL_H) \
     sched-int.h $(BASIC_BLOCK_H) $(REGS_H) hard-reg-set.h flags.h insn-config.h function.h \
!    $(INSN_ATTR_H) toplev.h $(RECOG_H) except.h $(TM_P_H) $(PARAMS_H) profile.h
  sched-vis.o : sched-vis.c $(CONFIG_H) $(SYSTEM_H) coretypes.h $(TM_H) $(RTL_H) \
     sched-int.h hard-reg-set.h $(BASIC_BLOCK_H) $(INSN_ATTR_H) $(REGS_H) $(TM_P_H) \
     $(TARGET_H) real.h


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