aboutsummaryrefslogtreecommitdiff
path: root/gcc/loop.c
diff options
context:
space:
mode:
authorTom Wood <wood@gnu.org>1992-10-13 18:45:45 +0000
committerTom Wood <wood@gnu.org>1992-10-13 18:45:45 +0000
commit1c01e9df92a901c69981316978aab8a8124705ff (patch)
tree3e9962eea5cd46a4da629d222756d0e544c9d1dd /gcc/loop.c
parent2988e8a39e50f3acb58b82c8bca8f06b5d2562a9 (diff)
downloadgcc-1c01e9df92a901c69981316978aab8a8124705ff.zip
gcc-1c01e9df92a901c69981316978aab8a8124705ff.tar.gz
gcc-1c01e9df92a901c69981316978aab8a8124705ff.tar.bz2
(loop_optimize): Verify that max_uid_for_loop is still larger than the uid of any insn.
(loop_optimize): Verify that max_uid_for_loop is still larger than the uid of any insn. Increase the number of exit blocks from 4 to 32 per loop. (find_and_verify_loops): Stop trying to relocate exit blocks when allocating a new label would exceed max_uid_for_loop. From-SVN: r2440
Diffstat (limited to 'gcc/loop.c')
-rw-r--r--gcc/loop.c12
1 files changed, 8 insertions, 4 deletions
diff --git a/gcc/loop.c b/gcc/loop.c
index 87509be..232b882 100644
--- a/gcc/loop.c
+++ b/gcc/loop.c
@@ -361,7 +361,7 @@ loop_optimize (f, dumpfile)
/* Get size to use for tables indexed by uids.
Leave some space for labels allocated by find_and_verify_loops. */
- max_uid_for_loop = get_max_uid () + 1 + max_loop_num * 4;
+ max_uid_for_loop = get_max_uid () + 1 + max_loop_num * 32;
uid_luid = (int *) alloca (max_uid_for_loop * sizeof (int));
uid_loop_num = (int *) alloca (max_uid_for_loop * sizeof (int));
@@ -386,6 +386,10 @@ loop_optimize (f, dumpfile)
function. */
reg_scan (f, max_reg_num (), 1);
+ /* See if we went too far. */
+ if (get_max_uid () > max_uid_for_loop)
+ abort ();
+
/* Compute the mapping from uids to luids.
LUIDs are numbers assigned to insns, like uids,
except that luids increase monotonically through the code.
@@ -2240,7 +2244,8 @@ find_and_verify_loops (f)
&& (GET_CODE (PATTERN (insn)) == RETURN
|| (simplejump_p (insn)
&& (uid_loop_num[INSN_UID (JUMP_LABEL (insn))]
- != this_loop_num))))
+ != this_loop_num)))
+ && get_max_uid () < max_uid_for_loop)
{
rtx p;
rtx our_next = next_real_insn (insn);
@@ -2299,8 +2304,7 @@ find_and_verify_loops (f)
/* Verify that uid_loop_num is large enough and that
we can invert P. */
- if (INSN_UID (new_label) < max_uid_for_loop
- && invert_jump (p, new_label))
+ if (invert_jump (p, new_label))
{
rtx q, r;