diff options
author | Jakub Jelinek <jakub@redhat.com> | 2010-11-24 17:56:44 +0100 |
---|---|---|
committer | Jakub Jelinek <jakub@gcc.gnu.org> | 2010-11-24 17:56:44 +0100 |
commit | 0d40d51cf5d58f791e23b201b5100c8db4063ad3 (patch) | |
tree | 7a0688da5418ba89145b1c48716b4202ada97dac /gcc/sched-deps.c | |
parent | 6a227990f722042edd7bae6fd755759520c550ba (diff) | |
download | gcc-0d40d51cf5d58f791e23b201b5100c8db4063ad3.zip gcc-0d40d51cf5d58f791e23b201b5100c8db4063ad3.tar.gz gcc-0d40d51cf5d58f791e23b201b5100c8db4063ad3.tar.bz2 |
re PR rtl-optimization/46614 (gcc.dg/vect/vect-strided-u8-i8-gap4.c FAILs with -fno-rename-registers -fsched2-use-superblocks)
PR rtl-optimization/46614
* sched-deps.c (NON_FLUSH_JUMP_KIND, NON_FLUSH_JUMP_P): Define.
(deps_analyze_insn): Mark JUMP_INSNs in
last_pending_memory_flush that weren't added through
flush_pending_lists with NON_FLUSH_JUMP_KIND.
(sched_analyze_2, sched_analyze_insn): Check NON_FLUSH_JUMP_P
on INSN_LIST instead of JUMP_P check on its operand.
* sched-rgn.c (concat_INSN_LIST): Copy over REG_NOTE_KIND.
* gcc.dg/pr46614.c: New test.
From-SVN: r167121
Diffstat (limited to 'gcc/sched-deps.c')
-rw-r--r-- | gcc/sched-deps.c | 22 |
1 files changed, 17 insertions, 5 deletions
diff --git a/gcc/sched-deps.c b/gcc/sched-deps.c index d2e3bb8..d1610af 100644 --- a/gcc/sched-deps.c +++ b/gcc/sched-deps.c @@ -53,6 +53,12 @@ along with GCC; see the file COPYING3. If not see #define CHECK (false) #endif +/* In deps->last_pending_memory_flush marks JUMP_INSNs that weren't + added to the list because of flush_pending_lists, stands just + for itself and not for any other pending memory reads/writes. */ +#define NON_FLUSH_JUMP_KIND REG_DEP_ANTI +#define NON_FLUSH_JUMP_P(x) (REG_NOTE_KIND (x) == NON_FLUSH_JUMP_KIND) + /* Holds current parameters for the dependency analyzer. */ struct sched_deps_info_def *sched_deps_info; @@ -2484,7 +2490,7 @@ sched_analyze_2 (struct deps_desc *deps, rtx x, rtx insn) for (u = deps->last_pending_memory_flush; u; u = XEXP (u, 1)) { - if (! JUMP_P (XEXP (u, 0))) + if (! NON_FLUSH_JUMP_P (u)) add_dependence (insn, XEXP (u, 0), REG_DEP_ANTI); else if (deps_may_trap_p (x)) { @@ -2796,8 +2802,7 @@ sched_analyze_insn (struct deps_desc *deps, rtx x, rtx insn) REG_DEP_ANTI); for (u = deps->last_pending_memory_flush; u; u = XEXP (u, 1)) - if (! JUMP_P (XEXP (u, 0)) - || !sel_sched_p ()) + if (! NON_FLUSH_JUMP_P (u) || !sel_sched_p ()) add_dependence (insn, XEXP (u, 0), REG_DEP_ANTI); EXECUTE_IF_SET_IN_REG_SET (reg_pending_uses, 0, i, rsi) @@ -3242,8 +3247,15 @@ deps_analyze_insn (struct deps_desc *deps, rtx insn) if (deps->pending_flush_length++ > MAX_PENDING_LIST_LENGTH) flush_pending_lists (deps, insn, true, true); else - deps->last_pending_memory_flush - = alloc_INSN_LIST (insn, deps->last_pending_memory_flush); + { + deps->last_pending_memory_flush + = alloc_INSN_LIST (insn, deps->last_pending_memory_flush); + /* Signal to sched_analyze_insn that this jump stands + just for its own, not any other pending memory + reads/writes flush_pending_lists had to flush. */ + PUT_REG_NOTE_KIND (deps->last_pending_memory_flush, + NON_FLUSH_JUMP_KIND); + } } sched_analyze_insn (deps, PATTERN (insn), insn); |