loop.c (scan_loop): Count down from max_reg_num - 1 to FIRST_PSEUDO_REGISTER to avoid...
authorJeffrey A Law <law@cygnus.com>
Thu, 27 Aug 1998 23:19:47 +0000 (23:19 +0000)
committerJeff Law <law@gcc.gnu.org>
Thu, 27 Aug 1998 23:19:47 +0000 (17:19 -0600)
        * loop.c (scan_loop): Count down from max_reg_num - 1 to
        FIRST_PSEUDO_REGISTER to avoid calling max_reg_num each iteration
        of the loop.
        (load_mems_and_recount_loop_regs_set): Likewise.
Forgot second AVOID_CCMODE_COPIES loop.

From-SVN: r22044

gcc/ChangeLog
gcc/loop.c

index 8322877536ccde69b643bcd00d0f741c1fd3779f..6db8ceaddffa0b140c7e2f03baec568e5e62c0ed 100644 (file)
@@ -1,8 +1,9 @@
 Thu Aug 27 20:10:46 1998  Jeffrey A Law  (law@cygnus.com)
 
        * loop.c (scan_loop): Count down from max_reg_num - 1 to
-       FIRST_PSEUDO_REGISTER to avoid calilng max_reg_num each iteration
+       FIRST_PSEUDO_REGISTER to avoid calling max_reg_num each iteration
        of the loop.
+       (load_mems_and_recount_loop_regs_set): Likewise.
 
        * i386.c (print_operand): Remove obsolete 'c' docs.
 
index b4623224cb7903d920aa8ac4eb108559a24b5459..3301f7d2f29149cd0c1bc93998690b24245fa518 100644 (file)
@@ -8613,7 +8613,7 @@ load_mems_and_recount_loop_regs_set (scan_start, end, loop_top, start,
 #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 < max_reg_num (); i++)
+      for (i = max_reg_num () - 1; i >= FIRST_PSEUDO_REGISTER; i--)
        if (GET_MODE_CLASS (GET_MODE (regno_reg_rtx[i])) == MODE_CC)
          VARRAY_CHAR (may_not_optimize, i) = 1;
 #endif