]> gcc.gnu.org Git - gcc.git/commitdiff
(block_alloc): Don't attempt to allocate a
authorJim Wilson <wilson@gcc.gnu.org>
Tue, 3 Aug 1993 19:38:40 +0000 (12:38 -0700)
committerJim Wilson <wilson@gcc.gnu.org>
Tue, 3 Aug 1993 19:38:40 +0000 (12:38 -0700)
SCRATCH if it will not fit in scratch_list.

From-SVN: r5058

gcc/local-alloc.c

index 5d7b0e6da9aaa799d3a28f6fe5c20edaf5a12879..00c06e804add51ea1b0ec963fd67c372a16ad36f 100644 (file)
@@ -1099,6 +1099,9 @@ block_alloc (b)
   int max_uid = get_max_uid ();
   int *qty_order;
   int no_conflict_combined_regno = -1;
+  /* Counter to prevent allocating more SCRATCHes than can be stored
+     in SCRATCH_LIST.  */
+  int scratches_allocated = scratch_index;
 
   /* Count the instructions in the basic block.  */
 
@@ -1341,7 +1344,7 @@ block_alloc (b)
          if (insn_code_number >= 0)
            for (i = 0; i < insn_n_operands[insn_code_number]; i++)
              if (GET_CODE (recog_operand[i]) == SCRATCH
-                 && scratch_index < scratch_list_length - 1)
+                 && scratches_allocated++ < scratch_list_length)
                alloc_qty_for_scratch (recog_operand[i], i, insn,
                                       insn_code_number, insn_number);
 
This page took 0.059097 seconds and 5 git commands to generate.