summaryrefslogtreecommitdiff
path: root/gcc/global.c
diff options
context:
space:
mode:
authorrsandifo <rsandifo@138bc75d-0d04-0410-961f-82ee72b054a4>2007-05-22 19:33:37 +0000
committerrsandifo <rsandifo@138bc75d-0d04-0410-961f-82ee72b054a4>2007-05-22 19:33:37 +0000
commitddc556d140656052c5583cc83c8d795107786dfc (patch)
treecfa4aaeabd4b1bbd0608b1fb3976bc0540f8ed3a /gcc/global.c
parentd98c6d3671297d88cfa3b70a45e684bd04edf072 (diff)
downloadgcc-ddc556d140656052c5583cc83c8d795107786dfc.tar.gz
gcc/
* hard-reg-set.h (GO_IF_HARD_REG_SUBSET, GO_IF_HARD_REG_EQUAL): Delete in favor of... (hard_reg_subset_p, hard_reg_sets_equal_p, hard_reg_sets_intersect_p) (hard_reg_set_empty_p): ...these new functions. * bt-load.c (choose_btr): Use hard_reg_subset_p instead of GO_IF_HARD_REG_SUBSET. * cfgcleanup.c (old_insns_match_p): Use hard_reg_sets_equal_p instead of GO_IF_HARD_REG_EQUAL. * df-problems.c (df_urec_local_compute): Use hard_reg_set_empty_p instead of GO_IF_HARD_REG_EQUAL. * global.c (find_reg): Use hard_reg_set_empty_p instead of GO_IF_HARD_REG_SUBSET. (modify_reg_pav): Use hard_reg_set_empty_p instead of GO_IF_HARD_REG_EQUAL. * local-alloc.c (find_free_reg): Use hard_reg_subset_p instead of GO_IF_HARD_REG_SUBSET. * reg-stack.c (change_stack, convert_regs_1): Use hard_reg_sets_equal_p instead of GO_IF_HARD_REG_EQUAL. * regclass.c (init_reg_sets_1, reg_scan_mark_refs): Use hard_reg_subset_p instead of GO_IF_HARD_REG_SUBSET. (reg_classes_intersect_p): Use hard_reg_sets_intersect_p instead of GO_IF_HARD_REG_SUBSET, * reload1.c (finish_spills): Use hard_reg_subset_p instead of GO_IF_HARD_REG_SUBSET. * struct-equiv.c (death_notes_match_p): Use hard_reg_sets_equal_p instead of GO_IF_HARD_REG_EQUAL. * config/sh/sh.c (push_regs, calc_live_regs): Use hard_reg_sets_intersect_p instead of hard_regs_intersect_p. (hard_regs_intersect_p): Delete. git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/trunk@124954 138bc75d-0d04-0410-961f-82ee72b054a4
Diffstat (limited to 'gcc/global.c')
-rw-r--r--gcc/global.c22
1 files changed, 7 insertions, 15 deletions
diff --git a/gcc/global.c b/gcc/global.c
index b6bfa4d9f39..fd947607533 100644
--- a/gcc/global.c
+++ b/gcc/global.c
@@ -1161,10 +1161,8 @@ find_reg (int num, HARD_REG_SET losers, int alt_regs_p, int accept_call_clobbere
preferred registers. */
AND_COMPL_HARD_REG_SET (allocno[num].hard_reg_copy_preferences, used);
- GO_IF_HARD_REG_SUBSET (allocno[num].hard_reg_copy_preferences,
- reg_class_contents[(int) NO_REGS], no_copy_prefs);
-
- if (best_reg >= 0)
+ if (!hard_reg_set_empty_p (allocno[num].hard_reg_copy_preferences)
+ && best_reg >= 0)
{
for (i = 0; i < FIRST_PSEUDO_REGISTER; i++)
if (TEST_HARD_REG_BIT (allocno[num].hard_reg_copy_preferences, i)
@@ -1197,13 +1195,10 @@ find_reg (int num, HARD_REG_SET losers, int alt_regs_p, int accept_call_clobbere
}
}
}
- no_copy_prefs:
AND_COMPL_HARD_REG_SET (allocno[num].hard_reg_preferences, used);
- GO_IF_HARD_REG_SUBSET (allocno[num].hard_reg_preferences,
- reg_class_contents[(int) NO_REGS], no_prefs);
-
- if (best_reg >= 0)
+ if (!hard_reg_set_empty_p (allocno[num].hard_reg_preferences)
+ && best_reg >= 0)
{
for (i = 0; i < FIRST_PSEUDO_REGISTER; i++)
if (TEST_HARD_REG_BIT (allocno[num].hard_reg_preferences, i)
@@ -2437,10 +2432,9 @@ modify_reg_pav (void)
struct bb_info *bb_info;
#ifdef STACK_REGS
int i;
- HARD_REG_SET zero, stack_hard_regs, used;
+ HARD_REG_SET stack_hard_regs, used;
bitmap stack_regs;
- CLEAR_HARD_REG_SET (zero);
CLEAR_HARD_REG_SET (stack_hard_regs);
for (i = FIRST_STACK_REG; i <= LAST_STACK_REG; i++)
SET_HARD_REG_BIT(stack_hard_regs, i);
@@ -2450,10 +2444,8 @@ modify_reg_pav (void)
COPY_HARD_REG_SET (used, reg_class_contents[reg_preferred_class (i)]);
IOR_HARD_REG_SET (used, reg_class_contents[reg_alternate_class (i)]);
AND_HARD_REG_SET (used, stack_hard_regs);
- GO_IF_HARD_REG_EQUAL(used, zero, skip);
- bitmap_set_bit (stack_regs, i);
- skip:
- ;
+ if (!hard_reg_set_empty_p (used))
+ bitmap_set_bit (stack_regs, i);
}
#endif
FOR_EACH_BB (bb)