diff options
author | J"orn Rennecke <amylaar@cygnus.co.uk> | 1998-03-26 10:44:22 +0000 |
---|---|---|
committer | Joern Rennecke <amylaar@gcc.gnu.org> | 1998-03-26 10:44:22 +0000 |
commit | 812f205146d174f71073ac23f51d362c1bc11575 (patch) | |
tree | b18dac3add5f9a70edef18d3f253fca7a887d445 /gcc/reload.c | |
parent | 49bf0d6f8011a1a6c7fddfba237dcf42855fa1a4 (diff) | |
download | gcc-812f205146d174f71073ac23f51d362c1bc11575.zip gcc-812f205146d174f71073ac23f51d362c1bc11575.tar.gz gcc-812f205146d174f71073ac23f51d362c1bc11575.tar.bz2 |
regclass.c (record_reg_classes): '?' increases cost by two.
* regclass.c (record_reg_classes): '?' increases cost by two.
* reload.c (find_reloads): Double previous costs. Output
reloads cost one unit extra.
* reload1.c (eliminate_regs): Delete LOAD_EXTENDED_OP code that
boiled down to && ! 0.
* reload.c (find_equiv_reg): Also consider a goal offset from the
frame pointer to be constant.
From-SVN: r18842
Diffstat (limited to 'gcc/reload.c')
-rw-r--r-- | gcc/reload.c | 23 |
1 files changed, 16 insertions, 7 deletions
diff --git a/gcc/reload.c b/gcc/reload.c index 2783686..e89c251 100644 --- a/gcc/reload.c +++ b/gcc/reload.c @@ -2670,7 +2670,7 @@ find_reloads (insn, replace, ind_levels, live_known, reload_reg_p) or got the wrong kind of hard reg. For this, we must consider all the operands together against the register constraints. */ - best = MAX_RECOG_OPERANDS + 300; + best = MAX_RECOG_OPERANDS * 2 + 600; swapped = 0; goal_alternative_swapped = 0; @@ -2836,11 +2836,11 @@ find_reloads (insn, replace, ind_levels, live_known, reload_reg_p) break; case '?': - reject += 3; + reject += 6; break; case '!': - reject = 300; + reject = 600; break; case '#': @@ -3227,6 +3227,11 @@ find_reloads (insn, replace, ind_levels, live_known, reload_reg_p) && REGNO (operand) >= FIRST_PSEUDO_REGISTER) && GET_CODE (operand) != SCRATCH && ! (const_to_mem && constmemok)) + reject += 2; + + /* Input reloads can be inherited more often than output + reloads can be removed, so penalize output reloads. */ + if (operand_type[i] != RELOAD_FOR_INPUT) reject++; } @@ -3267,7 +3272,7 @@ find_reloads (insn, replace, ind_levels, live_known, reload_reg_p) this_alternative[i])) this_alternative[i] = (int) preferred_class[i]; else - reject += (1 + pref_or_nothing[i]); + reject += (2 + 2 * pref_or_nothing[i]); } } } @@ -3374,9 +3379,9 @@ find_reloads (insn, replace, ind_levels, live_known, reload_reg_p) /* REJECT, set by the ! and ? constraint characters and when a register would be reloaded into a non-preferred class, discourages the use of - this alternative for a reload goal. REJECT is incremented by three - for each ? and one for each non-preferred class. */ - losers = losers * 3 + reject; + this alternative for a reload goal. REJECT is incremented by six + for each ? and two for each non-preferred class. */ + losers = losers * 6 + reject; /* If this alternative can be made to work by reloading, and it needs less reloading than the others checked so far, @@ -5705,6 +5710,10 @@ find_equiv_reg (goal, insn, class, other, reload_reg_p, goalreg, mode) && XEXP (goal, 0) == stack_pointer_rtx && CONSTANT_P (XEXP (goal, 1))) goal_const = need_stable_sp = 1; + else if (GET_CODE (goal) == PLUS + && XEXP (goal, 0) == frame_pointer_rtx + && CONSTANT_P (XEXP (goal, 1))) + goal_const = 1; else return 0; |