reload1.c (choose_reload_regs): Also try inheritance when reload_in is a stack slot of a pseudo...

* reload1.c (choose_reload_regs): Also try inheritance when
	reload_in is a stack slot of a pseudo, even if we already got a
	reload reg.

From-SVN: r22571
This commit is contained in:
J"orn Rennecke 1998-09-24 13:58:43 +00:00 committed by Joern Rennecke
parent 5adf6da0eb
commit b29514ee9d
2 changed files with 19 additions and 4 deletions

View File

@ -1,3 +1,9 @@
Thu Sep 24 21:48:51 1998 J"orn Rennecke <amylaar@cygnus.co.uk>
* reload1.c (choose_reload_regs): Also try inheritance when
reload_in is a stack slot of a pseudo, even if we already got a
reload reg.
Thu Sep 24 21:22:39 1998 J"orn Rennecke <amylaar@cygnus.co.uk> Thu Sep 24 21:22:39 1998 J"orn Rennecke <amylaar@cygnus.co.uk>
* reload1.c (reload_cse_regs_1): Renamed from reload_cse_regs. * reload1.c (reload_cse_regs_1): Renamed from reload_cse_regs.

View File

@ -5675,13 +5675,16 @@ choose_reload_regs (insn, avoid_return_reg)
&& ! reload_secondary_p[r]) && ! reload_secondary_p[r])
continue; continue;
/* If find_reloads chose a to use reload_in or reload_out as a reload /* If find_reloads chose to use reload_in or reload_out as a reload
register, we don't need to chose one. Otherwise, try even if it register, we don't need to chose one. Otherwise, try even if it
found one since we might save an insn if we find the value lying found one since we might save an insn if we find the value lying
around. */ around.
Try also when reload_in is a pseudo without a hard reg. */
if (reload_in[r] != 0 && reload_reg_rtx[r] != 0 if (reload_in[r] != 0 && reload_reg_rtx[r] != 0
&& (rtx_equal_p (reload_in[r], reload_reg_rtx[r]) && (rtx_equal_p (reload_in[r], reload_reg_rtx[r])
|| rtx_equal_p (reload_out[r], reload_reg_rtx[r]))) || (rtx_equal_p (reload_out[r], reload_reg_rtx[r])
&& GET_CODE (reload_in[r]) != MEM
&& true_regnum (reload_in[r]) < FIRST_PSEUDO_REGISTER)))
continue; continue;
#if 0 /* No longer needed for correct operation. #if 0 /* No longer needed for correct operation.
@ -5827,7 +5830,13 @@ choose_reload_regs (insn, avoid_return_reg)
/* Don't really use the inherited spill reg /* Don't really use the inherited spill reg
if we need it wider than we've got it. */ if we need it wider than we've got it. */
|| (GET_MODE_SIZE (reload_mode[r]) || (GET_MODE_SIZE (reload_mode[r])
> GET_MODE_SIZE (mode))) > GET_MODE_SIZE (mode))
/* If find_reloads chose reload_out as reload
register, stay with it - that leaves the
inherited register for subsequent reloads. */
|| (reload_reg_rtx
&& rtx_equal_p (reload_out[r],
reload_reg_rtx[r])))
reload_override_in[r] = reg_last_reload_reg[regno]; reload_override_in[r] = reg_last_reload_reg[regno];
else else
{ {