Commit b1c8622e by Bernd Schmidt Committed by Bernd Schmidt

reload.c (find_reloads): Revert code to penalize small register classes that was…

reload.c (find_reloads): Revert code to penalize small register classes that was brought in with the IRA...

	* reload.c (find_reloads): Revert code to penalize small register
	classes that was brought in with the IRA merge.

From-SVN: r162176
parent 2bd6311d
2010-07-14 Bernd Schmidt <bernds@codesourcery.com>
* reload.c (find_reloads): Revert code to penalize small register
classes that was brought in with the IRA merge.
2010-07-14 Richard Guenther <rguenther@suse.de> 2010-07-14 Richard Guenther <rguenther@suse.de>
* tree-ssa-ccp.c (fold_const_aggregate_ref): Handle MEM_REF * tree-ssa-ccp.c (fold_const_aggregate_ref): Handle MEM_REF
......
...@@ -2602,7 +2602,6 @@ find_reloads (rtx insn, int replace, int ind_levels, int live_known, ...@@ -2602,7 +2602,6 @@ find_reloads (rtx insn, int replace, int ind_levels, int live_known,
char goal_alternative_earlyclobber[MAX_RECOG_OPERANDS]; char goal_alternative_earlyclobber[MAX_RECOG_OPERANDS];
int goal_alternative_swapped; int goal_alternative_swapped;
int best; int best;
int best_small_class_operands_num;
int commutative; int commutative;
char operands_match[MAX_RECOG_OPERANDS][MAX_RECOG_OPERANDS]; char operands_match[MAX_RECOG_OPERANDS][MAX_RECOG_OPERANDS];
rtx substed_operand[MAX_RECOG_OPERANDS]; rtx substed_operand[MAX_RECOG_OPERANDS];
...@@ -2928,7 +2927,6 @@ find_reloads (rtx insn, int replace, int ind_levels, int live_known, ...@@ -2928,7 +2927,6 @@ find_reloads (rtx insn, int replace, int ind_levels, int live_known,
all the operands together against the register constraints. */ all the operands together against the register constraints. */
best = MAX_RECOG_OPERANDS * 2 + 600; best = MAX_RECOG_OPERANDS * 2 + 600;
best_small_class_operands_num = 0;
swapped = 0; swapped = 0;
goal_alternative_swapped = 0; goal_alternative_swapped = 0;
...@@ -3715,27 +3713,7 @@ find_reloads (rtx insn, int replace, int ind_levels, int live_known, ...@@ -3715,27 +3713,7 @@ find_reloads (rtx insn, int replace, int ind_levels, int live_known,
record it as the chosen goal for reloading. */ record it as the chosen goal for reloading. */
if (! bad) if (! bad)
{ {
bool change_p = false; if (best > losers)
int small_class_operands_num = 0;
if (best >= losers)
{
for (i = 0; i < noperands; i++)
small_class_operands_num
+= SMALL_REGISTER_CLASS_P (this_alternative[i]) ? 1 : 0;
if (best > losers
|| (best == losers
/* If the cost of the reloads is the same,
prefer alternative which requires minimal
number of small register classes for the
operands. This improves chances of reloads
for insn requiring small register
classes. */
&& (small_class_operands_num
< best_small_class_operands_num)))
change_p = true;
}
if (change_p)
{ {
for (i = 0; i < noperands; i++) for (i = 0; i < noperands; i++)
{ {
...@@ -3751,7 +3729,6 @@ find_reloads (rtx insn, int replace, int ind_levels, int live_known, ...@@ -3751,7 +3729,6 @@ find_reloads (rtx insn, int replace, int ind_levels, int live_known,
} }
goal_alternative_swapped = swapped; goal_alternative_swapped = swapped;
best = losers; best = losers;
best_small_class_operands_num = small_class_operands_num;
goal_alternative_number = this_alternative_number; goal_alternative_number = this_alternative_number;
goal_earlyclobber = this_earlyclobber; goal_earlyclobber = this_earlyclobber;
} }
......
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