diff options
author | obrien <obrien@FreeBSD.org> | 2002-05-09 20:02:13 +0000 |
---|---|---|
committer | obrien <obrien@FreeBSD.org> | 2002-05-09 20:02:13 +0000 |
commit | c8f5fc7032940ad6633f932ac40cade82ec4d0cc (patch) | |
tree | 29a0f0a6c79a69ecc64f612947a0fe5904311713 /contrib/gcc/haifa-sched.c | |
parent | c9ab9ae440a8066b2c2b85b157b1fdadcf09916a (diff) | |
download | FreeBSD-src-c8f5fc7032940ad6633f932ac40cade82ec4d0cc.zip FreeBSD-src-c8f5fc7032940ad6633f932ac40cade82ec4d0cc.tar.gz |
Gcc 3.1.0 pre-release from the FSF anoncvs repo on 9-May-2002 15:57:15 EDT.
Diffstat (limited to 'contrib/gcc/haifa-sched.c')
-rw-r--r-- | contrib/gcc/haifa-sched.c | 32 |
1 files changed, 20 insertions, 12 deletions
diff --git a/contrib/gcc/haifa-sched.c b/contrib/gcc/haifa-sched.c index 150cb09..686369d 100644 --- a/contrib/gcc/haifa-sched.c +++ b/contrib/gcc/haifa-sched.c @@ -1617,6 +1617,18 @@ move_insn (insn, last) return retval; } +/* Called from backends from targetm.sched.reorder to emit stuff into + the instruction stream. */ + +rtx +sched_emit_insn (pat) + rtx pat; +{ + rtx insn = emit_insn_after (pat, last_scheduled_insn); + last_scheduled_insn = insn; + return insn; +} + /* Use forward list scheduling to rearrange insns of block B in region RGN, possibly bringing insns from subsequent blocks in the same region. */ @@ -1625,7 +1637,6 @@ schedule_block (b, rgn_n_insns) int b; int rgn_n_insns; { - rtx last; struct ready_list ready; int can_issue_more; @@ -1673,8 +1684,8 @@ schedule_block (b, rgn_n_insns) if (targetm.sched.md_init) (*targetm.sched.md_init) (sched_dump, sched_verbose, ready.veclen); - /* No insns scheduled in this block yet. */ - last_scheduled_insn = 0; + /* We start inserting insns after PREV_HEAD. */ + last_scheduled_insn = prev_head; /* Initialize INSN_QUEUE. Q_SIZE is the total number of insns in the queue. */ @@ -1686,9 +1697,6 @@ schedule_block (b, rgn_n_insns) /* Start just before the beginning of time. */ clock_var = -1; - /* We start inserting insns after PREV_HEAD. */ - last = prev_head; - /* Loop until all the insns in BB are scheduled. */ while ((*current_sched_info->schedule_more_p) ()) { @@ -1700,9 +1708,6 @@ schedule_block (b, rgn_n_insns) list. */ queue_to_ready (&ready); - if (sched_verbose && targetm.sched.cycle_display) - last = (*targetm.sched.cycle_display) (clock_var, last); - if (ready.n_ready == 0) abort (); @@ -1725,6 +1730,10 @@ schedule_block (b, rgn_n_insns) else can_issue_more = issue_rate; + if (sched_verbose && targetm.sched.cycle_display) + last_scheduled_insn + = (*targetm.sched.cycle_display) (clock_var, last_scheduled_insn); + if (sched_verbose) { fprintf (sched_dump, "\n;;\tReady list (t =%3d): ", clock_var); @@ -1749,8 +1758,7 @@ schedule_block (b, rgn_n_insns) if (! (*current_sched_info->can_schedule_ready_p) (insn)) goto next; - last_scheduled_insn = insn; - last = move_insn (insn, last); + last_scheduled_insn = move_insn (insn, last_scheduled_insn); if (targetm.sched.variable_issue) can_issue_more = @@ -1798,7 +1806,7 @@ schedule_block (b, rgn_n_insns) /* Update head/tail boundaries. */ head = NEXT_INSN (prev_head); - tail = last; + tail = last_scheduled_insn; /* Restore-other-notes: NOTE_LIST is the end of a chain of notes previously found among the insns. Insert them at the beginning |