diff options
author | matz <matz@138bc75d-0d04-0410-961f-82ee72b054a4> | 2003-03-07 22:06:16 +0000 |
---|---|---|
committer | matz <matz@138bc75d-0d04-0410-961f-82ee72b054a4> | 2003-03-07 22:06:16 +0000 |
commit | bd9c340f19985166068e2408730c675b4f0ac550 (patch) | |
tree | dc3dd5799fdb6c6f8502860ceee126f8a01cd83b /gcc/ra-build.c | |
parent | 7c09476da68c084f10f9202d57e5015b4ea91821 (diff) | |
download | gcc-bd9c340f19985166068e2408730c675b4f0ac550.tar.gz |
* df.h (enum df_ref_flags.DF_REF_STRIPPED): New.
(DF_FOR_REGALLOC): New.
* df.c (df_ref_record): Set DF_REF_STRIPPED.
(read_modify_subreg_p): Simplify.
(df_def_record_1, df_uses_record): Set DF_REF_MODE_CHANGE more often.
Use DF_FOR_REGALLOC.
* ra.h (struct web): New member subreg_stripped.
(invalid_mode_change_regs): Declare.
* ra.c (invalid_mode_change_regs): New.
(init_ra): Initialize it.
* ra-build.c (init_one_web_common, remember_web_was_spilled): Use it.
Use CANNOT_CHANGE_MODE_CLASS as ifdef guard.
(reinit_one_web, parts_to_web_1): Deal with subreg_stripped.
* ra-colorize.c (colorize_one_web): Use invalid_mode_change_regs.
Use CANNOT_CHANGE_MODE_CLASS as ifdef guard.
git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/trunk@63952 138bc75d-0d04-0410-961f-82ee72b054a4
Diffstat (limited to 'gcc/ra-build.c')
-rw-r--r-- | gcc/ra-build.c | 17 |
1 files changed, 11 insertions, 6 deletions
diff --git a/gcc/ra-build.c b/gcc/ra-build.c index 4448065de0d..37ca30c7994 100644 --- a/gcc/ra-build.c +++ b/gcc/ra-build.c @@ -1305,10 +1305,9 @@ init_one_web_common (web, reg) AND_COMPL_HARD_REG_SET (web->usable_regs, never_use_colors); prune_hardregs_for_mode (&web->usable_regs, PSEUDO_REGNO_MODE (web->regno)); -#ifdef CLASS_CANNOT_CHANGE_MODE +#ifdef CANNOT_CHANGE_MODE_CLASS if (web->mode_changed) - AND_COMPL_HARD_REG_SET (web->usable_regs, reg_class_contents[ - (int) CLASS_CANNOT_CHANGE_MODE]); + AND_COMPL_HARD_REG_SET (web->usable_regs, invalid_mode_change_regs); #endif web->num_freedom = hard_regs_count (web->usable_regs); web->num_freedom -= web->add_hardregs; @@ -1351,6 +1350,7 @@ reinit_one_web (web, reg) web->artificial = 0; web->live_over_abnormal = 0; web->mode_changed = 0; + web->subreg_stripped = 0; web->move_related = 0; web->in_load = 0; web->target_of_spilled_move = 0; @@ -1912,6 +1912,9 @@ parts_to_webs_1 (df, copy_webs, all_refs) if ((DF_REF_FLAGS (ref) & DF_REF_MODE_CHANGE) != 0 && web->regno >= FIRST_PSEUDO_REGISTER) web->mode_changed = 1; + if ((DF_REF_FLAGS (ref) & DF_REF_STRIPPED) != 0 + && web->regno >= FIRST_PSEUDO_REGISTER) + web->subreg_stripped = 1; if (i >= def_id && TEST_BIT (live_over_abnormal, ref_id)) web->live_over_abnormal = 1; @@ -1961,6 +1964,9 @@ parts_to_webs_1 (df, copy_webs, all_refs) if ((DF_REF_FLAGS (ref) & DF_REF_MODE_CHANGE) != 0 && web->regno >= FIRST_PSEUDO_REGISTER) web->mode_changed = 1; + if ((DF_REF_FLAGS (ref) & DF_REF_STRIPPED) != 0 + && web->regno >= FIRST_PSEUDO_REGISTER) + web->subreg_stripped = 1; /* Setup def2web, or use2web, and increment num_defs or num_uses. */ if (i < def_id) @@ -2364,10 +2370,9 @@ remember_web_was_spilled (web) reg_class_contents[(int) GENERAL_REGS]); AND_COMPL_HARD_REG_SET (web->usable_regs, never_use_colors); prune_hardregs_for_mode (&web->usable_regs, PSEUDO_REGNO_MODE (web->regno)); -#ifdef CLASS_CANNOT_CHANGE_MODE +#ifdef CANNOT_CHANGE_MODE_CLASS if (web->mode_changed) - AND_COMPL_HARD_REG_SET (web->usable_regs, reg_class_contents[ - (int) CLASS_CANNOT_CHANGE_MODE]); + AND_COMPL_HARD_REG_SET (web->usable_regs, invalid_mode_change_regs); #endif web->num_freedom = hard_regs_count (web->usable_regs); if (!web->num_freedom) |