diff options
author | Steven Bosscher <steven@gcc.gnu.org> | 2010-05-03 17:47:47 +0000 |
---|---|---|
committer | Steven Bosscher <steven@gcc.gnu.org> | 2010-05-03 17:47:47 +0000 |
commit | 42db504c2fb2b460e24ca0e73b8559fc33b3cf33 (patch) | |
tree | d6b919e11206907a280cef642b29741b31e6e929 /gcc/reload.c | |
parent | d5ece0a1f59fd71e156bc58c8423eb7ea8d16480 (diff) | |
download | gcc-42db504c2fb2b460e24ca0e73b8559fc33b3cf33.zip gcc-42db504c2fb2b460e24ca0e73b8559fc33b3cf33.tar.gz gcc-42db504c2fb2b460e24ca0e73b8559fc33b3cf33.tar.bz2 |
tm.texi (defmac SMALL_REGISTER_CLASSES): Remove.
* doc/tm.texi (defmac SMALL_REGISTER_CLASSES): Remove.
(TARGET_SMALL_REGISTER_CLASSES_FOR_MODE_P): Add documentation,
based on the above, for new target hook.
* hooks.c (hook_bool_mode_true): New generic hook.
* hooks.h (hook_bool_mode_true): Add prototype.
* target.h (struct gcc_target): Add small_register_classes_for_mode_p
target hook.
* target-def.h (TARGET_SMALL_REGISTER_CLASSES_FOR_MODE_P): New default
target hook, set to hook_bool_mode_false.
* regs.h: Remove default definition of SMALL_REGISTER_CLASSES.
* reload.c (push_secondary_reload): Replace SMALL_REGISTER_CLASSES
with targetm.small_register_classes_for_mode_p.
(find_reusable_reload): Likewise.
(combine_reloads): Likewise.
* reload1.c (reload_as_needed): Likewise.
* cse.c (approx_reg_cost_1, hash_rtx_cb): Likewise.
* ifcvt.c (noce_process_if_block, check_cond_move_block,
dead_or_predicable): Likewise.
* regmove.c (optimize_reg_copy_1): Likewise.
* calls.c (prepare_call_address): Likewise.
(precompute_register_parameters): Likewise.
* config/sh/sh.h: Replace SMALL_REGISTER_CLASSES with new target
hook definition.
* config/sh/sh.c (sh_small_register_classes_for_mode_p): Add
implementation of the hook that considers all register classes
small except for SH64.
(sh_override_options): Use the new hook.
* config/sh/sh-protos.h (sh_small_register_classes_for_mode_p):
Add prototype.
* config/arm/arm.h: Replace SMALL_REGISTER_CLASSES with new target
hook definition.
* config/arm/arm.c (arm_small_register_classes_for_mode_p): Add
implementation of the hook that considers all register classes
small for THUMB1.
* config/arm/arm-protos.h (arm_small_register_classes_for_mode_p):
Add prototype.
* config/mips/mips.h: Replace SMALL_REGISTER_CLASSES with new target
hook definition.
* config/mips/mips.c (mips_small_register_classes_for_mode_p): Add
implementation of the hook that considers all register classes
small for MIPS16.
* config/mips/mips-protos.h (mips_small_register_classes_for_mode_p):
Add prototype.
* config/i386/i386.h: Replace SMALL_REGISTER_CLASSES with new target
hook definition.
* config/m32c/m32c.h: Likewise.
* config/pdp11/pdp11.h: Likewise.
* config/avr/avr.h: Likewise.
* config/xtensa/xtensa.h: Likewise.
* config/m68hc11/m68hc11.h: Likewise.
* config/mn10300/mn10300.h: Likewise.
* config/mcore/mcore.h: Likewise.
* config/h8300/h8300.h: Likewise.
* config/bfin/bfin.h: Likewise.
* config/iq2000/iq2000.h: Remove SMALL_REGISTER_CLASSES definition.
* config/rx/rx.h: Remove SMALL_REGISTER_CLASSES definition.
From-SVN: r158997
Diffstat (limited to 'gcc/reload.c')
-rw-r--r-- | gcc/reload.c | 19 |
1 files changed, 11 insertions, 8 deletions
diff --git a/gcc/reload.c b/gcc/reload.c index 2406b6b..ac2fa46 100644 --- a/gcc/reload.c +++ b/gcc/reload.c @@ -438,7 +438,8 @@ push_secondary_reload (int in_p, rtx x, int opnum, int optional, || (! in_p && rld[s_reload].secondary_out_reload == t_reload)) && ((in_p && rld[s_reload].secondary_in_icode == t_icode) || (! in_p && rld[s_reload].secondary_out_icode == t_icode)) - && (SMALL_REGISTER_CLASS_P (rclass) || SMALL_REGISTER_CLASSES) + && (SMALL_REGISTER_CLASS_P (rclass) + || targetm.small_register_classes_for_mode_p (VOIDmode)) && MERGABLE_RELOADS (secondary_type, rld[s_reload].when_needed, opnum, rld[s_reload].opnum)) { @@ -731,9 +732,9 @@ find_reusable_reload (rtx *p_in, rtx out, enum reg_class rclass, and the other is at worst neutral. (A zero compared against anything is neutral.) - If SMALL_REGISTER_CLASSES, don't use existing reloads unless they are - for the same thing since that can cause us to need more reload registers - than we otherwise would. */ + For targets with small register classes, don't use existing reloads + unless they are for the same thing since that can cause us to need + more reload registers than we otherwise would. */ for (i = 0; i < n_reloads; i++) if ((reg_class_subset_p (rclass, rld[i].rclass) @@ -747,7 +748,8 @@ find_reusable_reload (rtx *p_in, rtx out, enum reg_class rclass, || (out != 0 && MATCHES (rld[i].out, out) && (in == 0 || rld[i].in == 0 || MATCHES (rld[i].in, in)))) && (rld[i].out == 0 || ! earlyclobber_operand_p (rld[i].out)) - && (SMALL_REGISTER_CLASS_P (rclass) || SMALL_REGISTER_CLASSES) + && (SMALL_REGISTER_CLASS_P (rclass) + || targetm.small_register_classes_for_mode_p (VOIDmode)) && MERGABLE_RELOADS (type, rld[i].when_needed, opnum, rld[i].opnum)) return i; @@ -772,7 +774,8 @@ find_reusable_reload (rtx *p_in, rtx out, enum reg_class rclass, && GET_RTX_CLASS (GET_CODE (in)) == RTX_AUTOINC && MATCHES (XEXP (in, 0), rld[i].in))) && (rld[i].out == 0 || ! earlyclobber_operand_p (rld[i].out)) - && (SMALL_REGISTER_CLASS_P (rclass) || SMALL_REGISTER_CLASSES) + && (SMALL_REGISTER_CLASS_P (rclass) + || targetm.small_register_classes_for_mode_p (VOIDmode)) && MERGABLE_RELOADS (type, rld[i].when_needed, opnum, rld[i].opnum)) { @@ -1770,7 +1773,7 @@ combine_reloads (void) || rtx_equal_p (secondary_memlocs_elim[(int) rld[output_reload].outmode][rld[i].opnum], secondary_memlocs_elim[(int) rld[output_reload].outmode][rld[output_reload].opnum])) #endif - && (SMALL_REGISTER_CLASSES + && (targetm.small_register_classes_for_mode_p (VOIDmode) ? (rld[i].rclass == rld[output_reload].rclass) : (reg_class_subset_p (rld[i].rclass, rld[output_reload].rclass) @@ -1794,7 +1797,7 @@ combine_reloads (void) && ! reload_inner_reg_of_subreg (rld[i].in, rld[i].inmode, rld[i].when_needed != RELOAD_FOR_INPUT) && (reg_class_size[(int) rld[i].rclass] - || SMALL_REGISTER_CLASSES) + || targetm.small_register_classes_for_mode_p (VOIDmode)) /* We will allow making things slightly worse by combining an input and an output, but no worse than that. */ && (rld[i].when_needed == RELOAD_FOR_INPUT |