diff options
author | Alexander Monakov <amonakov@ispras.ru> | 2018-04-11 17:32:32 +0300 |
---|---|---|
committer | Alexander Monakov <amonakov@gcc.gnu.org> | 2018-04-11 17:32:32 +0300 |
commit | a87a01ea37562100e898c376013e701d1dcb0290 (patch) | |
tree | ce0a428e739163b8499095ea86b932000ed369cc /gcc/sched-rgn.c | |
parent | 52cdcfb7b4733ab7190b9699926407dc22f1b0fa (diff) | |
download | gcc-a87a01ea37562100e898c376013e701d1dcb0290.zip gcc-a87a01ea37562100e898c376013e701d1dcb0290.tar.gz gcc-a87a01ea37562100e898c376013e701d1dcb0290.tar.bz2 |
sched-rgn: run add_branch_dependencies for sel-sched (PR 84301)
PR target/84301
* sched-rgn.c (add_branch_dependences): Move sel_sched_p check here...
(compute_block_dependences): ... from here.
testsuite/
* gcc.target/i386/pr84301.c: New test.
From-SVN: r259321
Diffstat (limited to 'gcc/sched-rgn.c')
-rw-r--r-- | gcc/sched-rgn.c | 9 |
1 files changed, 6 insertions, 3 deletions
diff --git a/gcc/sched-rgn.c b/gcc/sched-rgn.c index 8c3a740..3c67fcc 100644 --- a/gcc/sched-rgn.c +++ b/gcc/sched-rgn.c @@ -2497,6 +2497,11 @@ add_branch_dependences (rtx_insn *head, rtx_insn *tail) while (insn != head && DEBUG_INSN_P (insn)); } + /* Selective scheduling handles control dependencies by itself, and + CANT_MOVE flags ensure that other insns will be kept in place. */ + if (sel_sched_p ()) + return; + /* Make sure these insns are scheduled last in their block. */ insn = last; if (insn != 0) @@ -2725,9 +2730,7 @@ compute_block_dependences (int bb) sched_analyze (&tmp_deps, head, tail); - /* Selective scheduling handles control dependencies by itself. */ - if (!sel_sched_p ()) - add_branch_dependences (head, tail); + add_branch_dependences (head, tail); if (current_nr_blocks > 1) propagate_deps (bb, &tmp_deps); |