diff options
author | Maxim Kuvyrkov <maxim@codesourcery.com> | 2009-07-09 18:15:22 +0000 |
---|---|---|
committer | Maxim Kuvyrkov <mkuvyrkov@gcc.gnu.org> | 2009-07-09 18:15:22 +0000 |
commit | 356c23b3059cc4516ee59c51ab0947a4308624ac (patch) | |
tree | 3cb914bdfcf5212d19e7a8855b5c111e763388ba /gcc/sched-rgn.c | |
parent | 5223c588529b44e0538b2b99e48c2cce6f96818b (diff) | |
download | gcc-356c23b3059cc4516ee59c51ab0947a4308624ac.zip gcc-356c23b3059cc4516ee59c51ab0947a4308624ac.tar.gz gcc-356c23b3059cc4516ee59c51ab0947a4308624ac.tar.bz2 |
haifa-sched.c (insn_finishes_cycle_p): New static function.
* haifa-sched.c (insn_finishes_cycle_p): New static function.
(max_issue): Use it.
* sched-int.h (struct sched_info: insn_finishes_block_p): New
scheduler hook.
* sched-rgn.c (rgn_insn_finishes_block_p): Implement it.
(region_sched_info): Update.
* sched-ebb.c (ebb_sched_info): Update.
* modulo-sched.c (sms_sched_info): Update.
* sel-sched-ir.c (sched_sel_haifa_sched_info): Update.
From-SVN: r149427
Diffstat (limited to 'gcc/sched-rgn.c')
-rw-r--r-- | gcc/sched-rgn.c | 14 |
1 files changed, 14 insertions, 0 deletions
diff --git a/gcc/sched-rgn.c b/gcc/sched-rgn.c index 004064e..a913faa 100644 --- a/gcc/sched-rgn.c +++ b/gcc/sched-rgn.c @@ -2338,6 +2338,19 @@ static const struct sched_deps_info_def rgn_const_sel_sched_deps_info = 0, 0, 0 }; +/* Return true if scheduling INSN will trigger finish of scheduling + current block. */ +static bool +rgn_insn_finishes_block_p (rtx insn) +{ + if (INSN_BB (insn) == target_bb + && sched_target_n_insns + 1 == target_n_insns) + /* INSN is the last not-scheduled instruction in the current block. */ + return true; + + return false; +} + /* Used in schedule_insns to initialize current_sched_info for scheduling regions (or single basic blocks). */ @@ -2350,6 +2363,7 @@ static const struct haifa_sched_info rgn_const_sched_info = rgn_rank, rgn_print_insn, contributes_to_priority, + rgn_insn_finishes_block_p, NULL, NULL, NULL, NULL, |