aboutsummaryrefslogtreecommitdiff
path: root/gcc
diff options
context:
space:
mode:
authorJeff Law <law@gcc.gnu.org>1999-02-15 03:37:22 -0700
committerJeff Law <law@gcc.gnu.org>1999-02-15 03:37:22 -0700
commitc4ae272555de2b9872514f6f73e63ba6c51765eb (patch)
tree1fa97fde3432609ecbf11605d2626cb7d729d702 /gcc
parentbc8ebe10f8e2e7e2e25b00a4494afae814a18536 (diff)
downloadgcc-c4ae272555de2b9872514f6f73e63ba6c51765eb.zip
gcc-c4ae272555de2b9872514f6f73e63ba6c51765eb.tar.gz
gcc-c4ae272555de2b9872514f6f73e63ba6c51765eb.tar.bz2
loop.c (mark_loop_jump): Handle LO_SUM.
� * loop.c (mark_loop_jump): Handle LO_SUM. If we encounter something we do not understand, mark the loop and containing loops as invalid. From-SVN: r25215
Diffstat (limited to 'gcc')
-rw-r--r--gcc/loop.c27
1 files changed, 16 insertions, 11 deletions
diff --git a/gcc/loop.c b/gcc/loop.c
index 3c8e890..3ea9751 100644
--- a/gcc/loop.c
+++ b/gcc/loop.c
@@ -2981,6 +2981,11 @@ mark_loop_jump (x, loop_num)
mark_loop_jump (XEXP (x, 1), loop_num);
return;
+ case LO_SUM:
+ /* This may refer to a LABEL_REF or SYMBOL_REF. */
+ mark_loop_jump (XEXP (x, 1), loop_num);
+ return;
+
case SIGN_EXTEND:
case ZERO_EXTEND:
mark_loop_jump (XEXP (x, 0), loop_num);
@@ -3068,21 +3073,21 @@ mark_loop_jump (x, loop_num)
return;
default:
- /* Treat anything else (such as a symbol_ref)
- as a branch out of this loop, but not into any loop. */
-
+ /* Strictly speaking this is not a jump into the loop, only a possible
+ jump out of the loop. However, we have no way to link the destination
+ of this jump onto the list of exit labels. To be safe we mark this
+ loop and any containing loops as invalid. */
if (loop_num != -1)
{
-#ifdef HAVE_decrement_and_branch_on_count
- LABEL_OUTSIDE_LOOP_P (x) = 1;
- LABEL_NEXTREF (x) = loop_number_exit_labels[loop_num];
-#endif /* HAVE_decrement_and_branch_on_count */
-
- loop_number_exit_labels[loop_num] = x;
-
for (outer_loop = loop_num; outer_loop != -1;
outer_loop = loop_outer_loop[outer_loop])
- loop_number_exit_count[outer_loop]++;
+ {
+ if (loop_dump_stream && ! loop_invalid[outer_loop])
+ fprintf (loop_dump_stream,
+ "\nLoop at %d ignored due to unknown exit jump.\n",
+ INSN_UID (loop_number_loop_starts[outer_loop]));
+ loop_invalid[outer_loop] = 1;
+ }
}
return;
}