aboutsummaryrefslogtreecommitdiff
path: root/gcc/sched-rgn.c
diff options
context:
space:
mode:
authorRichard Earnshaw <rearnsha@arm.com>2005-07-29 09:32:14 +0000
committerRichard Earnshaw <rearnsha@gcc.gnu.org>2005-07-29 09:32:14 +0000
commitabf86bf22730d89446f0013e9ce0fd6cddbc6e25 (patch)
treeeccb16c0a23cc6721068c0e1621ece7af06a0871 /gcc/sched-rgn.c
parent37cf61167f3d85b235bec602cef96b6e39764f2c (diff)
downloadgcc-abf86bf22730d89446f0013e9ce0fd6cddbc6e25.zip
gcc-abf86bf22730d89446f0013e9ce0fd6cddbc6e25.tar.gz
gcc-abf86bf22730d89446f0013e9ce0fd6cddbc6e25.tar.bz2
re PR rtl-optimization/23117 (ICE on valid code while building libgcc)
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. Co-Authored-By: Steven Bosscher <stevenb@suse.de> From-SVN: r102551
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 a4c1964..ef18282 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
}