summaryrefslogtreecommitdiff
path: root/gcc/sched-rgn.c
diff options
context:
space:
mode:
authorrearnsha <rearnsha@138bc75d-0d04-0410-961f-82ee72b054a4>2005-07-29 09:32:14 +0000
committerrearnsha <rearnsha@138bc75d-0d04-0410-961f-82ee72b054a4>2005-07-29 09:32:14 +0000
commitf19b9016e8286db0046315873c9a5eb96d1ddf98 (patch)
treeeccb16c0a23cc6721068c0e1621ece7af06a0871 /gcc/sched-rgn.c
parentd618034b09e41657a5c4b85f35b11fab3b2d0fc9 (diff)
downloadgcc-f19b9016e8286db0046315873c9a5eb96d1ddf98.tar.gz
Richard Earnshaw <richard.earnshaw@arm.com>
Steven Bosscher <stevenb@suse.de> PR rtl-optimization/23117 * sched-rgn.c (add_branch_dependences): Handle COND_EXEC correctly when head == tail. Tidy comment. git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/trunk@102551 138bc75d-0d04-0410-961f-82ee72b054a4
Diffstat (limited to 'gcc/sched-rgn.c')
-rw-r--r--gcc/sched-rgn.c10
1 files changed, 5 insertions, 5 deletions
diff --git a/gcc/sched-rgn.c b/gcc/sched-rgn.c
index a4c19648200..ef182821412 100644
--- a/gcc/sched-rgn.c
+++ b/gcc/sched-rgn.c
@@ -1954,9 +1954,9 @@ add_branch_dependences (rtx head, rtx tail)
T = [addr]
C ? addr += 4
- !C ? X += 12
+ !C ? X += 12
C ? T += 1
- C ? jump foo
+ C ? jump foo
On a target with a one cycle stall on a memory access the optimal
sequence would be:
@@ -1977,17 +1977,17 @@ add_branch_dependences (rtx head, rtx tail)
if (!reload_completed || ! JUMP_P (tail))
return;
- insn = PREV_INSN (tail);
+ insn = tail;
while (insn != head)
{
+ insn = PREV_INSN (insn);
+
/* Note that we want to add this dependency even when
sched_insns_conditions_mutex_p returns true. The whole point
is that we _want_ this dependency, even if these insns really
are independent. */
if (INSN_P (insn) && GET_CODE (PATTERN (insn)) == COND_EXEC)
add_dependence (tail, insn, REG_DEP_ANTI);
-
- insn = PREV_INSN (insn);
}
#endif
}