Commit dd0208b9 by David S. Miller Committed by David S. Miller

loop.c (scan_loop): Allocate some slop to handle pseudos generated by move_movables.

	* 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
parent dce2e8c0
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.
......
......@@ -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),
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment