Add hooks for the machine to override the sorting of the ready list and variable issue rates

From-SVN: r20740
This commit is contained in:
Michael Meissner 1998-06-26 13:09:01 +00:00 committed by Michael Meissner
parent db3d4438e6
commit e4da5f6da4
3 changed files with 53 additions and 0 deletions

View File

@ -1,3 +1,10 @@
Fri Jun 26 16:03:15 1998 Michael Meissner <meissner@cygnus.com>
* haifa-sched.c (schedule_block): Add hooks for the machine
description to reorder the ready list, and update how many more
instructions can be issued this cycle.
* tm.texi (MD_SCHED_{INIT,REORDER,VARIABLE_ISSUE}): Document.
Fri Jun 26 11:54:11 1998 David S. Miller <davem@pierdol.cobaltmicro.com>
* config/sparc/sparc.h (REGNO_OK_FOR_{INDEX,BASE,FP,CCFP}_P):

View File

@ -6725,11 +6725,18 @@ schedule_block (bb, rgn_n_insns)
}
}
#ifdef MD_SCHED_INIT
MD_SCHED_INIT (dump, sched_verbose);
#endif
/* no insns scheduled in this block yet */
last_scheduled_insn = 0;
/* Sort the ready list */
SCHED_SORT (ready, n_ready);
#ifdef MD_SCHED_REORDER
MD_SCHED_REORDER (dump, sched_verbose, ready, n_ready);
#endif
if (sched_verbose >= 2)
{
@ -6776,6 +6783,9 @@ schedule_block (bb, rgn_n_insns)
/* Sort the ready list. */
SCHED_SORT (ready, n_ready);
#ifdef MD_SCHED_REORDER
MD_SCHED_REORDER (dump, sched_verbose, ready, n_ready);
#endif
if (sched_verbose)
{
@ -6865,7 +6875,11 @@ schedule_block (bb, rgn_n_insns)
last = move_insn (insn, last);
sched_n_insns++;
#ifdef MD_SCHED_VARIABLE_ISSUE
MD_SCHED_VARIABLE_ISSUE (dump, sched_verbose, insn, can_issue_more);
#else
can_issue_more--;
#endif
n_ready = schedule_insn (insn, ready, n_ready, clock_var);

View File

@ -7417,6 +7417,38 @@ A C expression that returns how many instructions can be issued at the
same time if the machine is a superscalar machine. This is only used by
the @samp{Haifa} scheduler, and not the traditional scheduler.
@findex MD_SCHED_INIT
@item MD_SCHED_INIT (@var{file}, @var{verbose}
A C statement which is executed by the @samp{Haifa} scheduler at the
beginning of each block of instructions that are to be scheduled.
@var{file} is either a null pointer, or a stdio stream to write any
debug output to. @var{verbose} is the verbose level provided by
@samp{-fsched-verbose-}@var{n}.
@findex MD_SCHED_REORDER
@item MD_SCHED_REORDER (@var{file}, @var{verbose}, @var{ready}, @var{n_ready})
A C statement which is executed by the @samp{Haifa} scheduler after it
has scheduled the ready list to allow the machine description to reorder
it (for example to combine two small instructions together on
@samp{VLIW} machines). @var{file} is either a null pointer, or a stdio
stream to write any debug output to. @var{verbose} is the verbose level
provided by @samp{-fsched-verbose-}@var{n}. @var{ready} is a pointer to
the ready list of instructions that are ready to be scheduled.
@var{n_ready} is the number of elements in the ready list. The
scheduler reads the ready list in reverse order, starting with
@var{ready}[@var{n_ready}-1] and going to @var{ready}[0].
@findex MD_SCHED_VARIABLE_ISSUE
@item MD_SCHED_VARIABLE_ISSUE (@var{file}, @var{verbose}, @var{insn}, @var{more})
A C statement which is executed by the @samp{Haifa} scheduler after it
has scheduled an insn from the ready list. @var{file} is either a null
pointer, or a stdio stream to write any debug output to. @var{verbose}
is the verbose level provided by @samp{-fsched-verbose-}@var{n}.
@var{insn} is the instruction that was scheduled. @var{more} is the
number of instructions that can be issued in the current cycle. The
@samp{MD_SCHED_VARIABLE_ISSUE} macro is responsible for updating the
value of @var{more} (typically by @var{more}--).
@findex MAX_INTEGER_COMPUTATION_MODE
@item MAX_INTEGER_COMPUTATION_MODE
Define this to the largest integer machine mode which can be used for