diff options
author | rth <rth@138bc75d-0d04-0410-961f-82ee72b054a4> | 2002-05-02 23:59:52 +0000 |
---|---|---|
committer | rth <rth@138bc75d-0d04-0410-961f-82ee72b054a4> | 2002-05-02 23:59:52 +0000 |
commit | 87fe19fc641547f6f4169566792bae286169b611 (patch) | |
tree | bb037bbd88e7c88ed9fc60cad80131d6de5684be | |
parent | 42cc12fdf3c2135bbeec435803f12a1577a0a1cc (diff) | |
download | gcc-87fe19fc641547f6f4169566792bae286169b611.tar.gz |
* haifa-sched.c (rank_for_schedule): Skip past last_scheduled_insn
emitted by cycle_display.
git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/trunk@53072 138bc75d-0d04-0410-961f-82ee72b054a4
-rw-r--r-- | gcc/ChangeLog | 5 | ||||
-rw-r--r-- | gcc/haifa-sched.c | 17 |
2 files changed, 16 insertions, 6 deletions
diff --git a/gcc/ChangeLog b/gcc/ChangeLog index 31da6be8468..b88a93f24eb 100644 --- a/gcc/ChangeLog +++ b/gcc/ChangeLog @@ -1,3 +1,8 @@ +2002-05-02 Richard Henderson <rth@redhat.com> + + * haifa-sched.c (rank_for_schedule): Skip past last_scheduled_insn + emitted by cycle_display. + 2002-05-02 Loren J. Rittle <ljrittle@acm.org> * doc/install.texi (*-*-freebsd*): Update to latest status. diff --git a/gcc/haifa-sched.c b/gcc/haifa-sched.c index 2ac8121801f..7af0e73c69e 100644 --- a/gcc/haifa-sched.c +++ b/gcc/haifa-sched.c @@ -852,7 +852,7 @@ rank_for_schedule (x, y) { rtx tmp = *(const rtx *) y; rtx tmp2 = *(const rtx *) x; - rtx link; + rtx link, lsi; int tmp_class, tmp2_class, depend_count1, depend_count2; int val, priority_val, weight_val, info_val; @@ -871,23 +871,28 @@ rank_for_schedule (x, y) return info_val; /* Compare insns based on their relation to the last-scheduled-insn. */ - if (last_scheduled_insn) + for (lsi = last_scheduled_insn; + lsi && INSN_UID (lsi) >= old_max_uid; + lsi = PREV_INSN (lsi)) + continue; + + if (lsi) { /* Classify the instructions into three classes: 1) Data dependent on last schedule insn. 2) Anti/Output dependent on last scheduled insn. 3) Independent of last scheduled insn, or has latency of one. Choose the insn from the highest numbered class if different. */ - link = find_insn_list (tmp, INSN_DEPEND (last_scheduled_insn)); - if (link == 0 || insn_cost (last_scheduled_insn, link, tmp) == 1) + link = find_insn_list (tmp, INSN_DEPEND (lsi)); + if (link == 0 || insn_cost (lsi, link, tmp) == 1) tmp_class = 3; else if (REG_NOTE_KIND (link) == 0) /* Data dependence. */ tmp_class = 1; else tmp_class = 2; - link = find_insn_list (tmp2, INSN_DEPEND (last_scheduled_insn)); - if (link == 0 || insn_cost (last_scheduled_insn, link, tmp2) == 1) + link = find_insn_list (tmp2, INSN_DEPEND (lsi)); + if (link == 0 || insn_cost (lsi, link, tmp2) == 1) tmp2_class = 3; else if (REG_NOTE_KIND (link) == 0) /* Data dependence. */ tmp2_class = 1; |