aboutsummaryrefslogtreecommitdiff
path: root/gcc
diff options
context:
space:
mode:
authorMichael Meissner <meissner@cygnus.com>1998-06-26 13:09:01 +0000
committerMichael Meissner <meissner@gcc.gnu.org>1998-06-26 13:09:01 +0000
commite4da5f6da4fe345f57e510c3bc27450c667cf6cf (patch)
tree1b84b8ef7b7ac4d7a97eacaeef2694bb53e71b5a /gcc
parentdb3d4438e6f87dcc70900327f8db2af291633575 (diff)
downloadgcc-e4da5f6da4fe345f57e510c3bc27450c667cf6cf.zip
gcc-e4da5f6da4fe345f57e510c3bc27450c667cf6cf.tar.gz
gcc-e4da5f6da4fe345f57e510c3bc27450c667cf6cf.tar.bz2
Add hooks for the machine to override the sorting of the ready list and variable issue rates
From-SVN: r20740
Diffstat (limited to 'gcc')
-rw-r--r--gcc/ChangeLog7
-rw-r--r--gcc/haifa-sched.c14
-rw-r--r--gcc/tm.texi32
3 files changed, 53 insertions, 0 deletions
diff --git a/gcc/ChangeLog b/gcc/ChangeLog
index 87a4a7a..fbfaf6f 100644
--- a/gcc/ChangeLog
+++ b/gcc/ChangeLog
@@ -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):
diff --git a/gcc/haifa-sched.c b/gcc/haifa-sched.c
index 14eda50..fff73ca 100644
--- a/gcc/haifa-sched.c
+++ b/gcc/haifa-sched.c
@@ -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);
diff --git a/gcc/tm.texi b/gcc/tm.texi
index a4fb481..6f0d2dd 100644
--- a/gcc/tm.texi
+++ b/gcc/tm.texi
@@ -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