This is the mail archive of the
gcc-patches@gcc.gnu.org
mailing list for the GCC project.
[sel-sched] Merge with trunk. prepare the IA64 part for committing
- From: Andrey Belevantsev <abel at ispras dot ru>
- To: GCC Patches <gcc-patches at gcc dot gnu dot org>
- Cc: Steve Ellcey <sje at cup dot hp dot com>
- Date: Thu, 09 Oct 2008 13:35:39 +0400
- Subject: [sel-sched] Merge with trunk. prepare the IA64 part for committing
Hello,
I have merged the sel-sched branch with trunk rev. 140935. Also, I have
removed sel-sched specific flags. There is one problem though -- I
would like to enable control speculation in selective scheduling by
default, but not in the Haifa scheduler, as we didn't tune it for Haifa.
I did it by explicitly enabling the flag before running selective
scheduling in ia64_reorg, but now it cannot be disabled by user. Is
there any better solution? The problem is that you can't determine
whether the user explicitly set the flag or not, unless you create yet
another global variable in opts.c for that.
The patch bootstraps and regtests on ia64 except the libgomp.fortran/vla
* tests. This failure is not connected with sel-sched, as shown by the
thread starting at http://gcc.gnu.org/ml/gcc/2008-09/msg00503.html.
Committed to sel-sched branch. The only remaining issue before checking
in to trunk is setting _sc->prev_cycle_state to NULL in
ia64_clear_sched_context; this part fell through the cracks when I was
committing this patch.
Andrey
Merge with trunk rev. 140935.
* config/ia64/ia64.opt (msel-sched-data-spec,
msel-sched-control-spec,
mstop-bit-before-check): Remove.
(ia64_set_sched_flags): When determining supported speculation
types,
use only msched-* flags.
(ia64_reorg): Enable control speculation for selective scheduling.
Index: ia64.opt
===================================================================
*** ia64.opt (revision 140935)
--- ia64.opt (working copy)
*************** msched-max-memory-insns-hard-limit
*** 156,175 ****
Target Report Var(mflag_sched_mem_insns_hard_limit) Init(0)
Disallow more than `msched-max-memory-insns' in instruction group. Otherwise, limit is `soft' (prefer non-memory operations when limit is reached)
- msel-sched-data-spec
- Target Report Var(mflag_sel_sched_data_spec) Init(1)
- Perform data speculation in selective scheduling
-
- msel-sched-control-spec
- Target Report Var(mflag_sel_sched_control_spec) Init(1)
- Perform control speculation in selective scheduling
-
msel-sched-dont-check-control-spec
Target Report Var(mflag_sel_sched_dont_check_control_spec) Init(0)
Don't generate checks for control speculation in selective scheduling
- mstop-bit-before-check
- Target Report Var(mflag_stop_bit_before_check) Init(0)
- Force a barrier before a speculative check
-
; This comment is to ensure we retain the blank line above.
--- 156,163 ----
Index: ia64.c
===================================================================
*** ia64.c (revision 140935)
--- ia64.c (working copy)
*************** ia64_override_options (void)
*** 5269,5275 ****
ia64_flag_schedule_insns2 = flag_schedule_insns_after_reload;
flag_schedule_insns_after_reload = 0;
! if (optimize >= 2
&& ! sel_sched_switch_set)
{
flag_selective_scheduling2 = 1;
--- 5269,5275 ----
ia64_flag_schedule_insns2 = flag_schedule_insns_after_reload;
flag_schedule_insns_after_reload = 0;
! if (optimize >= 3
&& ! sel_sched_switch_set)
{
flag_selective_scheduling2 = 1;
*************** group_barrier_needed (rtx insn)
*** 6151,6165 ****
if (! need_barrier)
need_barrier = rws_access_regno (REG_VOLATILE, flags, 0);
- if (mflag_stop_bit_before_check)
- {
- /* Force a barrier before a speculative check. This is used to allow
- more instructions to move through the check and to minimize
- delaying of other instructions in case this checks stalls. */
- if (ia64_spec_check_p (insn))
- need_barrier = 1;
- }
-
break;
default:
--- 6151,6156 ----
*************** ia64_set_sched_flags (spec_info_t spec_i
*** 7216,7225 ****
{
int mask = 0;
! if ((!sel_sched_p ()
! && ((mflag_sched_br_data_spec && !reload_completed && optimize > 0)
! || (mflag_sched_ar_data_spec && reload_completed)))
! || (sel_sched_p () && mflag_sel_sched_data_spec))
{
mask |= BEGIN_DATA;
--- 7207,7214 ----
{
int mask = 0;
! if ((mflag_sched_br_data_spec && !reload_completed && optimize > 0)
! || (mflag_sched_ar_data_spec && reload_completed))
{
mask |= BEGIN_DATA;
*************** ia64_set_sched_flags (spec_info_t spec_i
*** 7229,7238 ****
mask |= BE_IN_DATA;
}
! if ((!sel_sched_p () && mflag_sched_control_spec)
! || (sel_sched_p ()
! && reload_completed
! && mflag_sel_sched_control_spec))
{
mask |= BEGIN_CONTROL;
--- 7218,7226 ----
mask |= BE_IN_DATA;
}
! if (mflag_sched_control_spec
! && (!sel_sched_p ()
! && reload_completed))
{
mask |= BEGIN_CONTROL;
*************** ia64_reorg (void)
*** 9190,9196 ****
--- 9178,9187 ----
if (flag_selective_scheduling2
&& !maybe_skip_selective_scheduling ())
+ {
+ mflag_sched_control_spec = 1;
run_selective_scheduling ();
+ }
else
schedule_ebbs ();