reload.c (find_reloads): Do not use the mode specified in the insn pattern as reload mode for address...
* reload.c (find_reloads): Do not use the mode specified in the insn pattern as reload mode for address operands. Do not generate optional reloads for operands where a mandatory reload was already pushed. From-SVN: r62410
This commit is contained in:
parent
2de2cd7851
commit
9537511bfa
2 changed files with 19 additions and 8 deletions
|
@ -1,3 +1,9 @@
|
||||||
|
2003-02-04 Ulrich Weigand <uweigand@de.ibm.com>
|
||||||
|
|
||||||
|
* reload.c (find_reloads): Do not use the mode specified in the insn
|
||||||
|
pattern as reload mode for address operands. Do not generate optional
|
||||||
|
reloads for operands where a mandatory reload was already pushed.
|
||||||
|
|
||||||
2003-02-04 Richard Henderson <rth@redhat.com>
|
2003-02-04 Richard Henderson <rth@redhat.com>
|
||||||
|
|
||||||
* longlong.h [alpha] (count_leading_zeros, count_trailing_zeros): Use
|
* longlong.h [alpha] (count_leading_zeros, count_trailing_zeros): Use
|
||||||
|
|
15
gcc/reload.c
15
gcc/reload.c
|
@ -2476,6 +2476,8 @@ find_reloads (insn, replace, ind_levels, live_known, reload_reg_p)
|
||||||
char pref_or_nothing[MAX_RECOG_OPERANDS];
|
char pref_or_nothing[MAX_RECOG_OPERANDS];
|
||||||
/* Nonzero for a MEM operand whose entire address needs a reload. */
|
/* Nonzero for a MEM operand whose entire address needs a reload. */
|
||||||
int address_reloaded[MAX_RECOG_OPERANDS];
|
int address_reloaded[MAX_RECOG_OPERANDS];
|
||||||
|
/* Nonzero for an address operand that needs to be completely reloaded. */
|
||||||
|
int address_operand_reloaded[MAX_RECOG_OPERANDS];
|
||||||
/* Value of enum reload_type to use for operand. */
|
/* Value of enum reload_type to use for operand. */
|
||||||
enum reload_type operand_type[MAX_RECOG_OPERANDS];
|
enum reload_type operand_type[MAX_RECOG_OPERANDS];
|
||||||
/* Value of enum reload_type to use within address of operand. */
|
/* Value of enum reload_type to use within address of operand. */
|
||||||
|
@ -2655,6 +2657,7 @@ find_reloads (insn, replace, ind_levels, live_known, reload_reg_p)
|
||||||
RTX_CODE code = GET_CODE (recog_data.operand[i]);
|
RTX_CODE code = GET_CODE (recog_data.operand[i]);
|
||||||
|
|
||||||
address_reloaded[i] = 0;
|
address_reloaded[i] = 0;
|
||||||
|
address_operand_reloaded[i] = 0;
|
||||||
operand_type[i] = (modified[i] == RELOAD_READ ? RELOAD_FOR_INPUT
|
operand_type[i] = (modified[i] == RELOAD_READ ? RELOAD_FOR_INPUT
|
||||||
: modified[i] == RELOAD_WRITE ? RELOAD_FOR_OUTPUT
|
: modified[i] == RELOAD_WRITE ? RELOAD_FOR_OUTPUT
|
||||||
: RELOAD_OTHER);
|
: RELOAD_OTHER);
|
||||||
|
@ -2669,7 +2672,8 @@ find_reloads (insn, replace, ind_levels, live_known, reload_reg_p)
|
||||||
else if (constraints[i][0] == 'p'
|
else if (constraints[i][0] == 'p'
|
||||||
|| EXTRA_ADDRESS_CONSTRAINT (constraints[i][0], constraints[i]))
|
|| EXTRA_ADDRESS_CONSTRAINT (constraints[i][0], constraints[i]))
|
||||||
{
|
{
|
||||||
find_reloads_address (recog_data.operand_mode[i], (rtx*) 0,
|
address_operand_reloaded[i]
|
||||||
|
= find_reloads_address (recog_data.operand_mode[i], (rtx*) 0,
|
||||||
recog_data.operand[i],
|
recog_data.operand[i],
|
||||||
recog_data.operand_loc[i],
|
recog_data.operand_loc[i],
|
||||||
i, operand_type[i], ind_levels, insn);
|
i, operand_type[i], ind_levels, insn);
|
||||||
|
@ -2689,6 +2693,10 @@ find_reloads (insn, replace, ind_levels, live_known, reload_reg_p)
|
||||||
|
|
||||||
recog_data.operand[i] = *recog_data.operand_loc[i];
|
recog_data.operand[i] = *recog_data.operand_loc[i];
|
||||||
substed_operand[i] = recog_data.operand[i];
|
substed_operand[i] = recog_data.operand[i];
|
||||||
|
|
||||||
|
/* Address operands are reloaded in their existing mode,
|
||||||
|
no matter what is specified in the machine description. */
|
||||||
|
operand_mode[i] = GET_MODE (recog_data.operand[i]);
|
||||||
}
|
}
|
||||||
else if (code == MEM)
|
else if (code == MEM)
|
||||||
{
|
{
|
||||||
|
@ -3302,10 +3310,6 @@ find_reloads (insn, replace, ind_levels, live_known, reload_reg_p)
|
||||||
the address into a base register. */
|
the address into a base register. */
|
||||||
this_alternative[i] = (int) MODE_BASE_REG_CLASS (VOIDmode);
|
this_alternative[i] = (int) MODE_BASE_REG_CLASS (VOIDmode);
|
||||||
badop = 0;
|
badop = 0;
|
||||||
|
|
||||||
/* Address constraints are reloaded in Pmode, no matter
|
|
||||||
what mode is given in the machine description. */
|
|
||||||
operand_mode[i] = Pmode;
|
|
||||||
break;
|
break;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -3878,6 +3882,7 @@ find_reloads (insn, replace, ind_levels, live_known, reload_reg_p)
|
||||||
}
|
}
|
||||||
else if (goal_alternative_matched[i] < 0
|
else if (goal_alternative_matched[i] < 0
|
||||||
&& goal_alternative_matches[i] < 0
|
&& goal_alternative_matches[i] < 0
|
||||||
|
&& !address_operand_reloaded[i]
|
||||||
&& optimize)
|
&& optimize)
|
||||||
{
|
{
|
||||||
/* For each non-matching operand that's a MEM or a pseudo-register
|
/* For each non-matching operand that's a MEM or a pseudo-register
|
||||||
|
|
Loading…
Add table
Reference in a new issue