loop.c (scan_loop): Allocate some slop to handle pseudos generated by move_movables.
authorDavid S. Miller <davem@pierdol.cobaltmicro.com>
Tue, 25 Aug 1998 00:37:12 +0000 (00:37 +0000)
committerDavid S. Miller <davem@gcc.gnu.org>
Tue, 25 Aug 1998 00:37:12 +0000 (17:37 -0700)
* loop.c (scan_loop): Allocate some slop to handle pseudos
generated by move_movables.
(load_mems_and_recount_loop_regs_set): Honor AVOID_CC_MODE_COPIES
here too.

From-SVN: r21955

gcc/ChangeLog
gcc/loop.c

index f14ad3e06781cfc89b9106eb0246aec81ca0f6a3..98e2b5311077edbf6168c442141b847a8f5b545b 100644 (file)
@@ -1,3 +1,10 @@
+Mon Aug 24 23:31:03 1998  David S. Miller  <davem@pierdol.cobaltmicro.com>
+
+       * loop.c (scan_loop): Allocate some slop to handle pseudos
+       generated by move_movables.
+       (load_mems_and_recount_loop_regs_set): Honor AVOID_CC_MODE_COPIES
+       here too.
+
 Mon Aug 24 19:45:40 1998  Jim Wilson  <wilson@cygnus.com>
 
        * tree.def (DECL_RESULT): Correct documentation.
index 88377d1fe52af884a484d4c44a059230b092d132..674b1ccd7d8e93c6d05a89e46f919536134d877c 100644 (file)
@@ -762,8 +762,8 @@ scan_loop (loop_start, end, unroll_p)
      reg_single_usage[I].  */
   
   /* Allocate extra space for REGS that might be created by
-     load_mems.  */
-  nregs = max_reg_num () + loop_mems_idx;
+     load_mems and move_movables.  */
+  nregs = max_reg_num () + loop_mems_idx + 100;
   n_times_set = (int *) alloca (nregs * sizeof (int));
   n_times_used = (int *) alloca (nregs * sizeof (int));
   may_not_optimize = (char *) alloca (nregs);
@@ -8443,6 +8443,14 @@ load_mems_and_recount_loop_regs_set (scan_start, end, loop_top, start,
       for (i = 0; i < FIRST_PSEUDO_REGISTER; i++)
        may_not_optimize[i] = 1, n_times_set[i] = 1;
       
+#ifdef AVOID_CCMODE_COPIES
+      /* Don't try to move insns which set CC registers if we should not
+        create CCmode register copies.  */
+      for (i = FIRST_PSEUDO_REGISTER; i < nregs - loop_mems_idx; i++)
+       if (GET_MODE_CLASS (GET_MODE (regno_reg_rtx[i])) == MODE_CC)
+         may_not_optimize[i] = 1;
+#endif
+
       /* Set n_times_used for the new registers.  */
       bcopy ((char *) (n_times_set + old_nregs),
             (char *) (n_times_used + old_nregs),