summaryrefslogtreecommitdiff
path: root/gcc/sched-rgn.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/sched-rgn.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/sched-rgn.c')
-rw-r--r--gcc/sched-rgn.c18
1 files changed, 15 insertions, 3 deletions
diff --git a/gcc/sched-rgn.c b/gcc/sched-rgn.c
index f921061deae..0b89e35ee3e 100644
--- a/gcc/sched-rgn.c
+++ b/gcc/sched-rgn.c
@@ -1756,7 +1756,13 @@ init_ready_list (struct ready_list *ready)
for (insn = NEXT_INSN (prev_head); insn != next_tail; insn = NEXT_INSN (insn))
{
if (INSN_DEP_COUNT (insn) == 0)
- ready_add (ready, insn);
+ {
+ ready_add (ready, insn);
+
+ if (targetm.sched.adjust_priority)
+ INSN_PRIORITY (insn) =
+ (*targetm.sched.adjust_priority) (insn, INSN_PRIORITY (insn));
+ }
target_n_insns++;
}
@@ -1792,7 +1798,13 @@ init_ready_list (struct ready_list *ready)
&& check_live (insn, bb_src)
&& is_exception_free (insn, bb_src, target_bb))))
if (INSN_DEP_COUNT (insn) == 0)
- ready_add (ready, insn);
+ {
+ ready_add (ready, insn);
+
+ if (targetm.sched.adjust_priority)
+ INSN_PRIORITY (insn) =
+ (*targetm.sched.adjust_priority) (insn, INSN_PRIORITY (insn));
+ }
}
}
}
@@ -1982,7 +1994,7 @@ static struct sched_info region_sched_info =
NULL, NULL,
NULL, NULL,
- 0, 0
+ 0, 0, 0
};
/* Determine if PAT sets a CLASS_LIKELY_SPILLED_P register. */