diff options
author | Maxim Kuvyrkov <maxim@codesourcery.com> | 2008-08-06 06:20:02 +0000 |
---|---|---|
committer | Maxim Kuvyrkov <mkuvyrkov@gcc.gnu.org> | 2008-08-06 06:20:02 +0000 |
commit | 07da1cfcf6b220900e88b457e2bb23ed9eeefac7 (patch) | |
tree | db17d5ec271eddbf73c917519bc74a8090394ccb /gcc | |
parent | 0f67bdf1cd15b11f00c1cc7476a33393ee77d938 (diff) | |
download | gcc-07da1cfcf6b220900e88b457e2bb23ed9eeefac7.zip gcc-07da1cfcf6b220900e88b457e2bb23ed9eeefac7.tar.gz gcc-07da1cfcf6b220900e88b457e2bb23ed9eeefac7.tar.bz2 |
sched-rgn.c (new_ready): Check if instruction can be speculatively scheduled before attempting speculation.
* sched-rgn.c (new_ready): Check if instruction can be
speculatively scheduled before attempting speculation.
(debug_rgn_dependencies): Remove wrongful assert.
From-SVN: r138757
Diffstat (limited to 'gcc')
-rw-r--r-- | gcc/ChangeLog | 6 | ||||
-rw-r--r-- | gcc/sched-rgn.c | 18 |
2 files changed, 21 insertions, 3 deletions
diff --git a/gcc/ChangeLog b/gcc/ChangeLog index b1c03e6..625b896 100644 --- a/gcc/ChangeLog +++ b/gcc/ChangeLog @@ -1,3 +1,9 @@ +2008-08-06 Maxim Kuvyrkov <maxim@codesourcery.com> + + * sched-rgn.c (new_ready): Check if instruction can be + speculatively scheduled before attempting speculation. + (debug_rgn_dependencies): Remove wrongful assert. + 2008-08-05 Bob Wilson <bob.wilson@acm.org> * config/xtensa/t-xtensa: Remove dependency for gt-xtensa.h. diff --git a/gcc/sched-rgn.c b/gcc/sched-rgn.c index 28f5283..9304536 100644 --- a/gcc/sched-rgn.c +++ b/gcc/sched-rgn.c @@ -2108,9 +2108,22 @@ new_ready (rtx next, ds_t ts) But we possibly can handle that with control speculation. */ && (current_sched_info->flags & DO_SPECULATION) && (spec_info->mask & BEGIN_CONTROL)) - /* Here we got new control-speculative instruction. */ - ts = set_dep_weak (ts, BEGIN_CONTROL, MAX_DEP_WEAK); + { + ds_t new_ds; + + /* Add control speculation to NEXT's dependency type. */ + new_ds = set_dep_weak (ts, BEGIN_CONTROL, MAX_DEP_WEAK); + + /* Check if NEXT can be speculated with new dependency type. */ + if (sched_insn_is_legitimate_for_speculation_p (next, new_ds)) + /* Here we got new control-speculative instruction. */ + ts = new_ds; + else + /* NEXT isn't ready yet. */ + ts = (ts & ~SPECULATIVE) | HARD_DEP; + } else + /* NEXT isn't ready yet. */ ts = (ts & ~SPECULATIVE) | HARD_DEP; } } @@ -2584,7 +2597,6 @@ debug_rgn_dependencies (int from_bb) { rtx head, tail; - gcc_assert (EBB_FIRST_BB (bb) == EBB_LAST_BB (bb)); get_ebb_head_tail (EBB_FIRST_BB (bb), EBB_LAST_BB (bb), &head, &tail); fprintf (sched_dump, "\n;; --- Region Dependences --- b %d bb %d \n", BB_TO_BLOCK (bb), bb); |