This is the mail archive of the
gcc-patches@gcc.gnu.org
mailing list for the GCC project.
RFA: A tiny patch solving problem of switching off dfa scheduler
- From: "Vladimir N. Makarov" <vmakarov at redhat dot com>
- To: gcc-patches at gcc dot gnu dot org
- Date: Fri, 05 Sep 2003 17:43:35 -0400
- Subject: RFA: A tiny patch solving problem of switching off dfa scheduler
The following patch solves the problem mentioned in
http://gcc.gnu.org/ml/gcc/2003-09/msg00237.html
The patch has been tested on x86.
Vlad
2003-09-05 Vladimir Makarov <vmakarov@redhat.com>
* haifa-sched.c (schedule_block): Use ready_remove_first instead
of choose_ready for non-dfa insn scheduling.
Index: haifa-sched.c
===================================================================
RCS file: /cvs/gcc/gcc/gcc/haifa-sched.c,v
retrieving revision 1.228
diff -6 -c -p -r1.228 haifa-sched.c
*** haifa-sched.c 19 Aug 2003 23:21:59 -0000 1.228
--- haifa-sched.c 5 Sep 2003 21:26:46 -0000
*************** schedule_block (int b, int rgn_n_insns)
*** 2243,2255 ****
if (!targetm.sched.use_dfa_pipeline_interface
|| !(*targetm.sched.use_dfa_pipeline_interface) ())
{
if (ready.n_ready == 0 || !can_issue_more
|| !(*current_sched_info->schedule_more_p) ())
break;
! insn = choose_ready (&ready);
cost = actual_hazard (insn_unit (insn), insn, clock_var,
0);
}
else
{
if (ready.n_ready == 0 || !can_issue_more
|| state_dead_lock_p (curr_state)
--- 2243,2255 ----
if (!targetm.sched.use_dfa_pipeline_interface
|| !(*targetm.sched.use_dfa_pipeline_interface) ())
{
if (ready.n_ready == 0 || !can_issue_more
|| !(*current_sched_info->schedule_more_p) ())
break;
! insn = ready_remove_first (&ready);
cost = actual_hazard (insn_unit (insn), insn, clock_var,
0);
}
else
{
if (ready.n_ready == 0 || !can_issue_more
|| state_dead_lock_p (curr_state)