summaryrefslogtreecommitdiff
path: root/gcc/haifa-sched.c
diff options
context:
space:
mode:
authorDorit Naishlos <dorit@il.ibm.com>2003-10-07 08:18:42 +0000
committerDorit Nuzman <dorit@gcc.gnu.org>2003-10-07 08:18:42 +0000
commit79ae11c4a302d90b678ed23fe4ccfb6a163a19fc (patch)
treef042ad15742db1c1a7071c97d5bdc6214b27d841 /gcc/haifa-sched.c
parent118355a03a02364b065d54f0d2fcfba4280b1226 (diff)
downloadgcc-79ae11c4a302d90b678ed23fe4ccfb6a163a19fc.tar.gz
sched-int.h (sched_info): New field sched_max_insns_priority.
* sched-int.h (sched_info): New field sched_max_insns_priority. * sched-rgn.c (init_ready_list): Add invocations to targetm.sched.adjust_priority. (sched_max_insns_priority): Init new field. * sched-ebb.c (sched_max_insns_priority): Init new field. * haifa-sched.c (set_priorities): Set sched_info->sched_max_insns_priority. * config/rs6000/rs6000.h: (rs6000_sched_restricted_insns_priority_str): Support new flag -mprioritize-restricted-insns. (DEFAULT_RESTRICTED_INSNS_PRIORITY): Define. * config/rs6000/rs6000.c (is_dispatch_slot_restricted): New function. (rs6000_adjust_priority): Change priority of restricted insns, using above new function and new flag. * doc/invoke.texi (-mprioritize-restricted-insns): Document new option. From-SVN: r72186
Diffstat (limited to 'gcc/haifa-sched.c')
-rw-r--r--gcc/haifa-sched.c11
1 files changed, 10 insertions, 1 deletions
diff --git a/gcc/haifa-sched.c b/gcc/haifa-sched.c
index 2776ec12c7f..652ad18b83b 100644
--- a/gcc/haifa-sched.c
+++ b/gcc/haifa-sched.c
@@ -2517,7 +2517,8 @@ set_priorities (rtx head, rtx tail)
{
rtx insn;
int n_insn;
-
+ int sched_max_insns_priority =
+ current_sched_info->sched_max_insns_priority;
rtx prev_head;
prev_head = PREV_INSN (head);
@@ -2526,6 +2527,7 @@ set_priorities (rtx head, rtx tail)
return 0;
n_insn = 0;
+ sched_max_insns_priority = 0;
for (insn = tail; insn != prev_head; insn = PREV_INSN (insn))
{
if (GET_CODE (insn) == NOTE)
@@ -2533,7 +2535,14 @@ set_priorities (rtx head, rtx tail)
n_insn++;
(void) priority (insn);
+
+ if (INSN_PRIORITY_KNOWN (insn))
+ sched_max_insns_priority =
+ MAX (sched_max_insns_priority, INSN_PRIORITY (insn));
}
+ sched_max_insns_priority += 1;
+ current_sched_info->sched_max_insns_priority =
+ sched_max_insns_priority;
return n_insn;
}