diff options
author | aldyh <aldyh@138bc75d-0d04-0410-961f-82ee72b054a4> | 2002-11-04 16:58:39 +0000 |
---|---|---|
committer | aldyh <aldyh@138bc75d-0d04-0410-961f-82ee72b054a4> | 2002-11-04 16:58:39 +0000 |
commit | 897118e835f7590d993642a56001e4113228f1a6 (patch) | |
tree | 9864774f05d9aef4abaed8431d0fa7b660a6a998 /gcc/reload.c | |
parent | ff1556781b984ee939f5b336df9aa18ce381ea1b (diff) | |
download | gcc-897118e835f7590d993642a56001e4113228f1a6.tar.gz |
2002-11-04 Aldy Hernandez <aldyh@redhat.com>
* hard-reg-set.h (REG_CANNOT_CHANGE_MODE_P): New.
* config/rs6000/rs6000.h (CLASS_CANNOT_CHANGE_MODE_P): Remove.
(CLASS_CANNOT_CHANGE_MODE): Remove.
(CANNOT_CHANGE_MODE_CLASS): New.
* config/alpha/alpha.h: Same.
* config/ia64/ia64.h: Same.
* config/mips/mips.h: Same.
* config/s390/s390.h: Same.
* config/sh/sh.h: Same.
* config/pa/pa64-regs.h: Same.
* config/sh/sh-protos.h (sh_cannot_change_mode_class): Add prototype.
* config/sh/sh.c (sh_cannot_change_mode_class): New.
* config/mips/mips-protos.h (mips_cannot_change_mode_class): Add
prototype.
* config/mips/mips.c (mips_cannot_change_mode_class): New.
* doc/tm.texi (Register Classes): Remove
CLASS_CANNOT_CHANGE_MODE and CLASS_CANNOT_CHANGE_MODE_P.
Document CANNOT_CHANGE_MODE_CLASS.
* reload.c (push_reload): Use CANNOT_CHANGE_MODE_CLASS.
(push_reload): Same.
* simplify-rtx.c (simplify_subreg): Same.
* reload1.c (choose_reload_regs): Same.
* recog.c (register_operand): Same.
* regrename.c (mode_change_ok): Change to use new
CANNOT_CHANGE_MODE_CLASS infrastructure.
* regclass.c (cannot_change_mode_set_regs): New.
Declare subregs_of_mode.
(regclass): Use subregs_of_mode.
Remove references to reg_changes_mode.
(init_reg_sets_1): Remove class_can_change_mode and
reg_changes_mode code.
(invalid_mode_change_p): New.
(dump_regclass): Use invalid_mode_change_p instead of
class_can_change_mode.
(regclass): Same.
(record_operand_costs): Do not set reg_changes_mode.
* local-alloc.c (struct qty): Remove changes_mode field.
(alloc_qty): Remove changes_mode initialization.
(update_qty_class): Remove set of changes_mode.
(find_free_reg): Use subregs_of_mode.
* global.c (find_reg): Use subregs_of_mode info.
* rtl.h (cannot_change_mode_set_regs): New prototype.
(invalid_mode_change_p): Same.
(REG_CANNOT_CHANGE_MODE_P): New macro.
* flow.c (mark_used_regs): Calculate subregs_of_mode. Remove
REG_CHANGES_MODE.
(life_analysis): Clear subregs_of_mode.
* combine.c (subst): Pass class to CLASS_CANNOT_CHANGE_MODE_P.
Remove use of CLASS_CANNOT_CHANGE_MODE.
(simplify_set): Same.
(gen_lowpart_for_combine): Calculate subregs_of_mode. Remove
REG_CHANGES_MODE.
* regs.h: Add extern for subregs_of_mode;
Include hard-reg-set and basic-block.
(REG_CHANGES_MODE): Delete.
git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/trunk@58794 138bc75d-0d04-0410-961f-82ee72b054a4
Diffstat (limited to 'gcc/reload.c')
-rw-r--r-- | gcc/reload.c | 34 |
1 files changed, 15 insertions, 19 deletions
diff --git a/gcc/reload.c b/gcc/reload.c index 97b35218caa..2b119886d4b 100644 --- a/gcc/reload.c +++ b/gcc/reload.c @@ -967,9 +967,10 @@ push_reload (in, out, inloc, outloc, class, if (in != 0 && GET_CODE (in) == SUBREG && (subreg_lowpart_p (in) || strict_low) -#ifdef CLASS_CANNOT_CHANGE_MODE - && (class != CLASS_CANNOT_CHANGE_MODE - || ! CLASS_CANNOT_CHANGE_MODE_P (GET_MODE (SUBREG_REG (in)), inmode)) +#ifdef CANNOT_CHANGE_MODE_CLASS + && !reg_classes_intersect_p + (class, CANNOT_CHANGE_MODE_CLASS (GET_MODE (SUBREG_REG (in)), + inmode)) #endif && (CONSTANT_P (SUBREG_REG (in)) || GET_CODE (SUBREG_REG (in)) == PLUS @@ -1016,14 +1017,11 @@ push_reload (in, out, inloc, outloc, class, SUBREG_REG (in)) == NO_REGS)) #endif -#ifdef CLASS_CANNOT_CHANGE_MODE +#ifdef CANNOT_CHANGE_MODE_CLASS || (GET_CODE (SUBREG_REG (in)) == REG && REGNO (SUBREG_REG (in)) < FIRST_PSEUDO_REGISTER - && (TEST_HARD_REG_BIT - (reg_class_contents[(int) CLASS_CANNOT_CHANGE_MODE], - REGNO (SUBREG_REG (in)))) - && CLASS_CANNOT_CHANGE_MODE_P (GET_MODE (SUBREG_REG (in)), - inmode)) + && REG_CANNOT_CHANGE_MODE_P + (REGNO (SUBREG_REG (in)), GET_MODE (SUBREG_REG (in)), inmode)) #endif )) { @@ -1081,10 +1079,10 @@ push_reload (in, out, inloc, outloc, class, and in that case the constraint should label it input-output.) */ if (out != 0 && GET_CODE (out) == SUBREG && (subreg_lowpart_p (out) || strict_low) -#ifdef CLASS_CANNOT_CHANGE_MODE - && (class != CLASS_CANNOT_CHANGE_MODE - || ! CLASS_CANNOT_CHANGE_MODE_P (GET_MODE (SUBREG_REG (out)), - outmode)) +#ifdef CANNOT_CHANGE_MODE_CLASS + && !reg_classes_intersect_p + (class, CANNOT_CHANGE_MODE_CLASS (GET_MODE (SUBREG_REG (out)), + outmode)) #endif && (CONSTANT_P (SUBREG_REG (out)) || strict_low @@ -1118,14 +1116,12 @@ push_reload (in, out, inloc, outloc, class, SUBREG_REG (out)) == NO_REGS)) #endif -#ifdef CLASS_CANNOT_CHANGE_MODE +#ifdef CANNOT_CHANGE_MODE_CLASS || (GET_CODE (SUBREG_REG (out)) == REG && REGNO (SUBREG_REG (out)) < FIRST_PSEUDO_REGISTER - && (TEST_HARD_REG_BIT - (reg_class_contents[(int) CLASS_CANNOT_CHANGE_MODE], - REGNO (SUBREG_REG (out)))) - && CLASS_CANNOT_CHANGE_MODE_P (GET_MODE (SUBREG_REG (out)), - outmode)) + && REG_CANNOT_CHANGE_MODE_P (REGNO (SUBREG_REG (out)), + GET_MODE (SUBREG_REG (out)), + outmode)) #endif )) { |