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: [sel-sched] Merge with trunk. prepare the IA64 part for committing


Steve Ellcey wrote:
I think that what you want to do is to change ia64.opt to initialize
mflag_sched_control_spec to 2 instead of to 0.  Then in
ia64_override_options, if it is still 2, set it to 0 or 1 depending on
what scheduler you are using.  If it is not 2 then the user set it (or
unset it) explicitly and you just leave it alone.
Thanks for your suggestion, implemented and committed (with fixing thinko from a previous patch) to sel-sched branch.

Andrey

2008-10-13 Andrey Belevantsev <abel@ispras.ru>

        * config/ia64/ia64.opt (mflag_sched_control_spec): Initialize to 2.
        * config/ia64/ia64.c (ia64_set_sched_flags): Fix thinko.
        (ia64_reorg): Do not set mflag_sched_control_spec to 1 here...
        (ia64_override_options): ... but process it here instead.
Index: gcc/config/ia64/ia64.opt
===================================================================
*** gcc/config/ia64/ia64.opt	(revision 141085)
--- gcc/config/ia64/ia64.opt	(revision 141086)
*************** Target Report Var(mflag_sched_ar_data_sp
*** 105,111 ****
  Use data speculation after reload
  
  msched-control-spec
! Target Report Var(mflag_sched_control_spec) Init(0)
  Use control speculation
  
  msched-br-in-data-spec
--- 105,111 ----
  Use data speculation after reload
  
  msched-control-spec
! Target Report Var(mflag_sched_control_spec) Init(2)
  Use control speculation
  
  msched-br-in-data-spec
Index: gcc/config/ia64/ia64.c
===================================================================
*** gcc/config/ia64/ia64.c	(revision 141085)
--- gcc/config/ia64/ia64.c	(revision 141086)
*************** ia64_override_options (void)
*** 5275,5280 ****
--- 5275,5286 ----
        flag_selective_scheduling2 = 1;
        flag_sel_sched_pipelining = 1;
      }
+   if (mflag_sched_control_spec == 2)
+     {
+       /* Control speculation is on by default for the selective scheduler,
+          but not for the Haifa scheduler.  */
+       mflag_sched_control_spec = flag_selective_scheduling2 ? 1 : 0;
+     }
    if (flag_sel_sched_pipelining && flag_auto_inc_dec)
      {
        /* FIXME: remove this when we'd implement breaking autoinsns as
*************** ia64_set_sched_flags (spec_info_t spec_i
*** 7220,7226 ****
        
        if (mflag_sched_control_spec
            && (!sel_sched_p ()
! 	      && reload_completed))
  	{
  	  mask |= BEGIN_CONTROL;
  	  
--- 7226,7232 ----
        
        if (mflag_sched_control_spec
            && (!sel_sched_p ()
! 	      || reload_completed))
  	{
  	  mask |= BEGIN_CONTROL;
  	  
*************** ia64_reorg (void)
*** 9178,9187 ****
  
        if (flag_selective_scheduling2
  	  && !maybe_skip_selective_scheduling ())
!         {
!           mflag_sched_control_spec = 1;
! 	  run_selective_scheduling ();
!         }
        else
  	schedule_ebbs ();
  
--- 9184,9190 ----
  
        if (flag_selective_scheduling2
  	  && !maybe_skip_selective_scheduling ())
!         run_selective_scheduling ();
        else
  	schedule_ebbs ();
  

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