+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.
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);
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),