summaryrefslogtreecommitdiff
path: root/gcc/regrename.c
diff options
context:
space:
mode:
authorhubicka <hubicka@138bc75d-0d04-0410-961f-82ee72b054a4>2004-02-02 00:17:18 +0000
committerhubicka <hubicka@138bc75d-0d04-0410-961f-82ee72b054a4>2004-02-02 00:17:18 +0000
commit67d6c12b056383ab8afca1005dd69a9c26c41060 (patch)
tree21152df3abafc985bdcf61fce3a0dd9124e7be71 /gcc/regrename.c
parent122e5fa06f277efafd538a8c95abd394c7d3557e (diff)
downloadgcc-67d6c12b056383ab8afca1005dd69a9c26c41060.tar.gz
* alias.c (record_set): Use hard_regno_nregs.
* bt-load.c (find_btr_reference, note_btr_set): Likewise. * builtins.c (apply_args_size): Likewise. * caller-save.c (setup_save_areas, save_call_clobbered_regs, mark_set_regs, add_stored_regs, mark_referenced_regs, insert_restore, insert_save, insert_one_insn): Likewise. * cfgcleanup.c: Include regs.h (mark_effect, mentions_nonequal_regs): Likewise. * cfgrtl.c (mark_killed_regs): Likewise * combine.c (update_table_tick, record_value_for_reg, record_dead_and_set_regs, get_last_value_validate, use_crosses_set_p, reg_dead_at_p_1, reg_dead_at_p, mark_used_regs_combine, move_deaths, reg_bitfield_target_p, distribute_notes): Likewise. * cse.c (mention_regs, insert, invalidate, invalidate_for_call, exp_equiv_p, cse_insn): Likewise. * cselib.c (cselib_lookup): Likewise. (cselib_invalidate_regno, cselib_record_set): Likewise. * df.c (df_ref_record): Likewise. * dwarf2out.c (reg_loc_descriptor, multiple_reg_loc_descriptor): Likewise. * flow.c (mark_reg, insn_dead_p, mark_set_1, mark_used_reg, count_or_remove_death_notes_bb): Likewise. * function.c (aggregate_value_p, keep_stack_depressed): Likewise. * gloval.c (global_alloc, find_reg, mark_reg_store, mark_reg_conflicts, mark_reg_death, set_preference, reg_becomes_live, reg_dies): Likewise. * integrate.c (mark_stores): Likewise. * jump.c (delete_prior_computation): Likewise. * lcm.c (reg_dies, reg_becomes_live): Likewise. * local-alloc.c (combine_regs, find_free_reg, post_mark_life): Likewise. * loop.c (LOOP_REGNO_NREGS): Likewise. * postreload.c (reload_combine, reload_combine_note_store, reload_combine_note_use, reload_cse_move2add, move2add_note_store): Likewise. * ra-colorize.c (combine, color_usable_p, get_free_reg, calculate_dont_begin, calculate_dont_begin, colorize_one_web, try_recolor_web, insert_coalesced_conflicts, check_colors, break_precolored_alias): Likewise. * ra-debug.c: Include regs.h (ra_print_rtx_object): Likewise. * ra-rewrite (choose_spill_colors): Likewise. (spill_same_color_p, update_spill_colors, spill_is_free): Likewise. * ra.c (init_ra): Likewise. * recog.c (reg_fits_class_p, peep2_reg_dead_p, peep2_find_free_register): Likewise. * reg-stack.c (subst_stack_regs_pat, convert_regs_exit): Likewise. * regclass.c (hard_regno_nregs): New array. (init_reg_modes_once): Initialize it. (choose_hard_reg_mode): Use it. (record_reg_classes): Likewise. * regmove.c (mark_flags_life_zones): Likewise. * regrename.c (note_sets, clear_dead_regs, regrename_optimize, scan_rtx_reg, dump_def_use_chain, kill_value, set_value_regno, copy_value, maybe_mode_change, find_oldest_value_reg, copyprop_hardreg_forward_1): * regs.h (hard_regno_nregs): Declare. * realod.c (reload_inner_reg_of_subreg): Use it. (push_reload, combine_reloads, find_dummy_reload, hard_reg_set_here_p, operands_match_p, decompose, find_reloads, refers_to_regno_for_reload_p, find_equiv_reg, regno_clobbered_p, reload_adjust_reg_for_mode): Likewise. * reload1.c (compute_use_by_pseudos, count_pseudo, count_spilled_pseudo, find_reg, find_reload_regs, mark_home_live, spill_hard_reg, forget_old_reloads_1, mark_reload_reg_in_use, clear_reload_reg_in_use, reload_reg_free_for_value_p, free_for_value_p allocate_reload_reg, choose_reload_regs, emit_reload_insns, delete_output_reload): Likewise. * resource.c (update_live_status, mark_referenced_resources, mark_set_resources, mark_target_live_regs): Likewise. * rtlanal.c: Include regs.h (refers_to_regno_p, reg_overlap_mentioned_p, dead_or_set_p, dead_or_set_regno_p, find_regno_note, find_reg_fusage, subreg_regno_offset, subreg_offset_representable_p, hoist_test_store): Likewise. * sched-deps.c (sched_analyze_1, sched_analyze_2): Likewise. * sched-rgn.c (check_live_1, update_live_1): Likewise. * stmt.c: Include regs.h (decl_conflicts_with_clobbers_p): Likewise. * varasm.c (make_decl_rtl): Likewise. * Makefile.in (cfgcleanup.o, rtlanal.o, ra-debug.o): Add regs.h dependnecy. git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/trunk@77088 138bc75d-0d04-0410-961f-82ee72b054a4
Diffstat (limited to 'gcc/regrename.c')
-rw-r--r--gcc/regrename.c44
1 files changed, 22 insertions, 22 deletions
diff --git a/gcc/regrename.c b/gcc/regrename.c
index e725ee932da..914bfbc9cb6 100644
--- a/gcc/regrename.c
+++ b/gcc/regrename.c
@@ -104,7 +104,7 @@ note_sets (rtx x, rtx set ATTRIBUTE_UNUSED, void *data)
if (GET_CODE (x) != REG)
return;
regno = REGNO (x);
- nregs = HARD_REGNO_NREGS (regno, GET_MODE (x));
+ nregs = hard_regno_nregs[regno][GET_MODE (x)];
/* There must not be pseudos at this point. */
if (regno + nregs > FIRST_PSEUDO_REGISTER)
@@ -126,7 +126,7 @@ clear_dead_regs (HARD_REG_SET *pset, enum machine_mode kind, rtx notes)
{
rtx reg = XEXP (note, 0);
unsigned int regno = REGNO (reg);
- int nregs = HARD_REGNO_NREGS (regno, GET_MODE (reg));
+ int nregs = hard_regno_nregs[regno][GET_MODE (reg)];
/* There must not be pseudos at this point. */
if (regno + nregs > FIRST_PSEUDO_REGISTER)
@@ -218,11 +218,11 @@ regrename_optimize (void)
{
int i;
- for (i = HARD_REGNO_NREGS (FRAME_POINTER_REGNUM, Pmode); i--;)
+ for (i = hard_regno_nregs[FRAME_POINTER_REGNUM][Pmode]; i--;)
SET_HARD_REG_BIT (unavailable, FRAME_POINTER_REGNUM + i);
#if FRAME_POINTER_REGNUM != HARD_FRAME_POINTER_REGNUM
- for (i = HARD_REGNO_NREGS (HARD_FRAME_POINTER_REGNUM, Pmode); i--;)
+ for (i = hard_regno_nregs[HARD_FRAME_POINTER_REGNUM][Pmode]; i--;)
SET_HARD_REG_BIT (unavailable, HARD_FRAME_POINTER_REGNUM + i);
#endif
}
@@ -287,7 +287,7 @@ regrename_optimize (void)
have a closer look at each register still in there. */
for (new_reg = 0; new_reg < FIRST_PSEUDO_REGISTER; new_reg++)
{
- int nregs = HARD_REGNO_NREGS (new_reg, GET_MODE (*this->loc));
+ int nregs = hard_regno_nregs[new_reg][GET_MODE (*this->loc)];
for (i = nregs - 1; i >= 0; --i)
if (TEST_HARD_REG_BIT (this_unavailable, new_reg + i)
@@ -391,7 +391,7 @@ scan_rtx_reg (rtx insn, rtx *loc, enum reg_class class,
rtx x = *loc;
enum machine_mode mode = GET_MODE (x);
int this_regno = REGNO (x);
- int this_nregs = HARD_REGNO_NREGS (this_regno, mode);
+ int this_nregs = hard_regno_nregs[this_regno][mode];
if (action == mark_write)
{
@@ -431,7 +431,7 @@ scan_rtx_reg (rtx insn, rtx *loc, enum reg_class class,
else
{
int regno = REGNO (*this->loc);
- int nregs = HARD_REGNO_NREGS (regno, GET_MODE (*this->loc));
+ int nregs = hard_regno_nregs[regno][GET_MODE (*this->loc)];
int exact_match = (regno == this_regno && nregs == this_nregs);
if (regno + nregs <= this_regno
@@ -973,7 +973,7 @@ dump_def_use_chain (struct du_chain *chains)
{
struct du_chain *this = chains;
int r = REGNO (*this->loc);
- int nregs = HARD_REGNO_NREGS (r, GET_MODE (*this->loc));
+ int nregs = hard_regno_nregs[r][GET_MODE (*this->loc)];
fprintf (rtl_dump_file, "Register %s (%d):", reg_names[r], nregs);
while (this)
{
@@ -1084,7 +1084,7 @@ kill_value (rtx x, struct value_data *vd)
if (REG_P (x))
{
unsigned int regno = REGNO (x);
- unsigned int n = HARD_REGNO_NREGS (regno, GET_MODE (x));
+ unsigned int n = hard_regno_nregs[regno][GET_MODE (x)];
unsigned int i, j;
/* Kill the value we're told to kill. */
@@ -1100,7 +1100,7 @@ kill_value (rtx x, struct value_data *vd)
{
if (vd->e[j].mode == VOIDmode)
continue;
- n = HARD_REGNO_NREGS (j, vd->e[j].mode);
+ n = hard_regno_nregs[j][vd->e[j].mode];
if (j + n > regno)
for (i = 0; i < n; ++i)
kill_value_regno (j + i, vd);
@@ -1118,7 +1118,7 @@ set_value_regno (unsigned int regno, enum machine_mode mode,
vd->e[regno].mode = mode;
- nregs = HARD_REGNO_NREGS (regno, mode);
+ nregs = hard_regno_nregs[regno][mode];
if (nregs > vd->max_value_regs)
vd->max_value_regs = nregs;
}
@@ -1210,8 +1210,8 @@ copy_value (rtx dest, rtx src, struct value_data *vd)
return;
/* If SRC and DEST overlap, don't record anything. */
- dn = HARD_REGNO_NREGS (dr, GET_MODE (dest));
- sn = HARD_REGNO_NREGS (sr, GET_MODE (dest));
+ dn = hard_regno_nregs[dr][GET_MODE (dest)];
+ sn = hard_regno_nregs[sr][GET_MODE (dest)];
if ((dr > sr && dr < sr + sn)
|| (sr > dr && sr < dr + dn))
return;
@@ -1237,7 +1237,7 @@ copy_value (rtx dest, rtx src, struct value_data *vd)
We can't properly represent the latter case in our tables, so don't
record anything then. */
- else if (sn < (unsigned int) HARD_REGNO_NREGS (sr, vd->e[sr].mode)
+ else if (sn < (unsigned int) hard_regno_nregs[sr][vd->e[sr].mode]
&& (GET_MODE_SIZE (vd->e[sr].mode) > UNITS_PER_WORD
? WORDS_BIG_ENDIAN : BYTES_BIG_ENDIAN))
return;
@@ -1245,7 +1245,7 @@ copy_value (rtx dest, rtx src, struct value_data *vd)
/* If SRC had been assigned a mode narrower than the copy, we can't
link DEST into the chain, because not all of the pieces of the
copy came from oldest_regno. */
- else if (sn > (unsigned int) HARD_REGNO_NREGS (sr, vd->e[sr].mode))
+ else if (sn > (unsigned int) hard_regno_nregs[sr][vd->e[sr].mode])
return;
/* Link DR at the end of the value chain used by SR. */
@@ -1291,8 +1291,8 @@ maybe_mode_change (enum machine_mode orig_mode, enum machine_mode copy_mode,
return gen_rtx_raw_REG (new_mode, regno);
else if (mode_change_ok (orig_mode, new_mode, regno))
{
- int copy_nregs = HARD_REGNO_NREGS (copy_regno, copy_mode);
- int use_nregs = HARD_REGNO_NREGS (copy_regno, new_mode);
+ int copy_nregs = hard_regno_nregs[copy_regno][copy_mode];
+ int use_nregs = hard_regno_nregs[copy_regno][new_mode];
int copy_offset
= GET_MODE_SIZE (copy_mode) / copy_nregs * (copy_nregs - use_nregs);
int offset
@@ -1330,8 +1330,8 @@ find_oldest_value_reg (enum reg_class class, rtx reg, struct value_data *vd)
Replacing r9 with r11 is invalid. */
if (mode != vd->e[regno].mode)
{
- if (HARD_REGNO_NREGS (regno, mode)
- > HARD_REGNO_NREGS (regno, vd->e[regno].mode))
+ if (hard_regno_nregs[regno][mode]
+ > hard_regno_nregs[regno][vd->e[regno].mode])
return NULL_RTX;
}
@@ -1341,7 +1341,7 @@ find_oldest_value_reg (enum reg_class class, rtx reg, struct value_data *vd)
rtx new;
unsigned int last;
- for (last = i; last < i + HARD_REGNO_NREGS (i, mode); last++)
+ for (last = i; last < i + hard_regno_nregs[i][mode]; last++)
if (!TEST_HARD_REG_BIT (reg_class_contents[class], last))
return NULL_RTX;
@@ -1600,8 +1600,8 @@ copyprop_hardreg_forward_1 (basic_block bb, struct value_data *vd)
set it in, make sure that the replacement is valid. */
if (mode != vd->e[regno].mode)
{
- if (HARD_REGNO_NREGS (regno, mode)
- > HARD_REGNO_NREGS (regno, vd->e[regno].mode))
+ if (hard_regno_nregs[regno][mode]
+ > hard_regno_nregs[regno][vd->e[regno].mode])
goto no_move_special_case;
}