summaryrefslogtreecommitdiff
path: root/gcc/loop.c
diff options
context:
space:
mode:
authorJan Hubicka <jh@suse.cz>2001-07-26 00:23:09 +0200
committerJan Hubicka <hubicka@gcc.gnu.org>2001-07-25 22:23:09 +0000
commitc4f81e4a6b4a1ff4774c8836de4a7241c57b278f (patch)
treebdf6f2181d743e47072722caa34cbf4c83b53189 /gcc/loop.c
parent472385a25f9771ac1171369f7b38d6e8845cc8cf (diff)
downloadgcc-c4f81e4a6b4a1ff4774c8836de4a7241c57b278f.tar.gz
predict.c (estimate_probability): Avoid duplicated predictions.
* predict.c (estimate_probability): Avoid duplicated predictions. * loop.c (find_and_verify_loops): Grok multiple barriers. From-SVN: r44369
Diffstat (limited to 'gcc/loop.c')
-rw-r--r--gcc/loop.c8
1 files changed, 8 insertions, 0 deletions
diff --git a/gcc/loop.c b/gcc/loop.c
index db1ec9df7a3..3584fe4c91b 100644
--- a/gcc/loop.c
+++ b/gcc/loop.c
@@ -2676,6 +2676,14 @@ find_and_verify_loops (f, loops)
= JUMP_LABEL (insn) ? JUMP_LABEL (insn) : get_last_insn ();
struct loop *target_loop = uid_loop[INSN_UID (target)];
rtx loc, loc2;
+ rtx tmp;
+
+ /* Search for possible garbage past the conditional jumps
+ and look for latest barrier. */
+ for (tmp = last_insn_to_move;
+ tmp && GET_CODE (tmp) != CODE_LABEL; tmp = NEXT_INSN (tmp))
+ if (GET_CODE (tmp) == BARRIER)
+ last_insn_to_move = tmp;
for (loc = target; loc; loc = PREV_INSN (loc))
if (GET_CODE (loc) == BARRIER