diff options
author | vmakarov <vmakarov@138bc75d-0d04-0410-961f-82ee72b054a4> | 2003-01-09 23:15:34 +0000 |
---|---|---|
committer | vmakarov <vmakarov@138bc75d-0d04-0410-961f-82ee72b054a4> | 2003-01-09 23:15:34 +0000 |
commit | 58ada791d3cb97df7eae8ab3db29f9a5d4149e79 (patch) | |
tree | 4c2dc43818bfc1ad93057e3973541f95b57fd3cc /gcc/sched-rgn.c | |
parent | e7bf79cf831a76f2e0d6c514f704aebcb6c389e8 (diff) | |
download | gcc-58ada791d3cb97df7eae8ab3db29f9a5d4149e79.tar.gz |
2003-01-09 Vladimir Makarov <vmakarov@redhat.com>
Merging changes from itanium-sched-branch:
git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/trunk@61132 138bc75d-0d04-0410-961f-82ee72b054a4
Diffstat (limited to 'gcc/sched-rgn.c')
-rw-r--r-- | gcc/sched-rgn.c | 64 |
1 files changed, 12 insertions, 52 deletions
diff --git a/gcc/sched-rgn.c b/gcc/sched-rgn.c index 43fdef72cd8..36a53f73c26 100644 --- a/gcc/sched-rgn.c +++ b/gcc/sched-rgn.c @@ -2023,17 +2023,9 @@ init_ready_list (ready) Count number of insns in the target block being scheduled. */ for (insn = NEXT_INSN (prev_head); insn != next_tail; insn = NEXT_INSN (insn)) { - rtx next; - - if (! INSN_P (insn)) - continue; - next = NEXT_INSN (insn); - - if (INSN_DEP_COUNT (insn) == 0 - && (! INSN_P (next) || SCHED_GROUP_P (next) == 0)) + if (INSN_DEP_COUNT (insn) == 0) ready_add (ready, insn); - if (!(SCHED_GROUP_P (insn))) - target_n_insns++; + target_n_insns++; } /* Add to ready list all 'ready' insns in valid source blocks. @@ -2067,19 +2059,8 @@ init_ready_list (ready) insn, insn) <= 3))) && check_live (insn, bb_src) && is_exception_free (insn, bb_src, target_bb)))) - { - rtx next; - - /* Note that we haven't squirreled away the notes for - blocks other than the current. So if this is a - speculative insn, NEXT might otherwise be a note. */ - next = next_nonnote_insn (insn); - if (INSN_DEP_COUNT (insn) == 0 - && (! next - || ! INSN_P (next) - || SCHED_GROUP_P (next) == 0)) - ready_add (ready, insn); - } + if (INSN_DEP_COUNT (insn) == 0) + ready_add (ready, insn); } } } @@ -2097,7 +2078,6 @@ can_schedule_ready_p (insn) /* An interblock motion? */ if (INSN_BB (insn) != target_bb) { - rtx temp; basic_block b1; if (IS_SPECULATIVE_INSN (insn)) @@ -2114,18 +2094,9 @@ can_schedule_ready_p (insn) } nr_inter++; - /* Find the beginning of the scheduling group. */ - /* ??? Ought to update basic block here, but later bits of - schedule_block assumes the original insn block is - still intact. */ - - temp = insn; - while (SCHED_GROUP_P (temp)) - temp = PREV_INSN (temp); - /* Update source block boundaries. */ - b1 = BLOCK_FOR_INSN (temp); - if (temp == b1->head && insn == b1->end) + b1 = BLOCK_FOR_INSN (insn); + if (insn == b1->head && insn == b1->end) { /* We moved all the insns in the basic block. Emit a note after the last insn and update the @@ -2139,9 +2110,9 @@ can_schedule_ready_p (insn) /* We took insns from the end of the basic block, so update the end of block boundary so that it points to the first insn we did not move. */ - b1->end = PREV_INSN (temp); + b1->end = PREV_INSN (insn); } - else if (temp == b1->head) + else if (insn == b1->head) { /* We took insns from the start of the basic block, so update the start of block boundary so that @@ -2361,17 +2332,6 @@ add_branch_dependences (head, tail) CANT_MOVE (insn) = 1; last = insn; - /* Skip over insns that are part of a group. - Make each insn explicitly depend on the previous insn. - This ensures that only the group header will ever enter - the ready queue (and, when scheduled, will automatically - schedule the SCHED_GROUP_P block). */ - while (SCHED_GROUP_P (insn)) - { - rtx temp = prev_nonnote_insn (insn); - add_dependence (insn, temp, REG_DEP_ANTI); - insn = temp; - } } /* Don't overrun the bounds of the basic block. */ @@ -2393,10 +2353,6 @@ add_branch_dependences (head, tail) add_dependence (last, insn, REG_DEP_ANTI); INSN_REF_COUNT (insn) = 1; - - /* Skip over insns that are part of a group. */ - while (SCHED_GROUP_P (insn)) - insn = prev_nonnote_insn (insn); } } @@ -2728,6 +2684,10 @@ schedule_region (rgn) get_block_head_tail (BB_TO_BLOCK (bb), &head, &tail); compute_forward_dependences (head, tail); + + if (targetm.sched.dependencies_evaluation_hook) + targetm.sched.dependencies_evaluation_hook (head, tail); + } /* Set priorities. */ |