aboutsummaryrefslogtreecommitdiff
path: root/gcc/caller-save.c
diff options
context:
space:
mode:
authorRichard Sandiford <richard.sandiford@arm.com>2019-09-09 17:59:14 +0000
committerRichard Sandiford <rsandifo@gcc.gnu.org>2019-09-09 17:59:14 +0000
commitdc333d8ff60909dbed89126443e3024f1592f8a4 (patch)
tree8cb63764fe33068c8b53a63d5441237984aa4aa7 /gcc/caller-save.c
parent50b3f54d551787e0a066451ef60ef3b055a893e6 (diff)
downloadgcc-dc333d8ff60909dbed89126443e3024f1592f8a4.zip
gcc-dc333d8ff60909dbed89126443e3024f1592f8a4.tar.gz
gcc-dc333d8ff60909dbed89126443e3024f1592f8a4.tar.bz2
Remove AND_HARD_REG_SET
Use "x &= y" instead of "AND_HARD_REG_SET (x, y)" (or just "x & y" if the result is a temporary). 2019-09-09 Richard Sandiford <richard.sandiford@arm.com> gcc/ * hard-reg-set.h (HARD_REG_SET::operator&): New function. (HARD_REG_SET::operator&): Likewise. (AND_HARD_REG_SET): Delete. * caller-save.c (setup_save_areas): Use "&" instead of AND_HARD_REG_SET. (save_call_clobbered_regs): Likewise. * config/gcn/gcn.c (gcn_md_reorg): Likewise. * config/m32c/m32c.c (reduce_class): Likewise. * config/rs6000/rs6000.c (rs6000_register_move_cost): Likewise. * final.c (get_call_reg_set_usage): Likewise. * ira-color.c (add_allocno_hard_regs_to_forest): Likewise. (setup_left_conflict_sizes_p): Likewise. * ira-conflicts.c (print_allocno_conflicts): Likewise. (ira_build_conflicts): Likewise. * ira-costs.c (restrict_cost_classes): Likewise. * ira.c (setup_stack_reg_pressure_class, setup_class_translate_array) (setup_reg_class_relations): Likewise. * reginfo.c (init_reg_sets_1, record_subregs_of_mode): Likewise. * reload1.c (maybe_fix_stack_asms, finish_spills): Likewise. * resource.c (find_dead_or_set_registers): Likewise. * sel-sched.c (mark_unavailable_hard_regs): Likewise. From-SVN: r275530
Diffstat (limited to 'gcc/caller-save.c')
-rw-r--r--gcc/caller-save.c8
1 files changed, 4 insertions, 4 deletions
diff --git a/gcc/caller-save.c b/gcc/caller-save.c
index 03a9b33..b6bcb7b 100644
--- a/gcc/caller-save.c
+++ b/gcc/caller-save.c
@@ -457,7 +457,7 @@ setup_save_areas (void)
AND_COMPL_HARD_REG_SET (used_regs, call_fixed_reg_set);
AND_COMPL_HARD_REG_SET (used_regs, this_insn_sets);
- AND_HARD_REG_SET (hard_regs_to_save, used_regs);
+ hard_regs_to_save &= used_regs;
for (regno = 0; regno < FIRST_PSEUDO_REGISTER; regno++)
if (TEST_HARD_REG_BIT (hard_regs_to_save, regno))
{
@@ -542,7 +542,7 @@ setup_save_areas (void)
AND_COMPL_HARD_REG_SET (used_regs, call_fixed_reg_set);
AND_COMPL_HARD_REG_SET (used_regs, this_insn_sets);
- AND_HARD_REG_SET (hard_regs_to_save, used_regs);
+ hard_regs_to_save &= used_regs;
for (regno = 0; regno < FIRST_PSEUDO_REGISTER; regno++)
if (TEST_HARD_REG_BIT (hard_regs_to_save, regno))
{
@@ -781,7 +781,7 @@ save_call_clobbered_regs (void)
CLEAR_HARD_REG_SET (referenced_regs);
mark_referenced_regs (&PATTERN (insn),
mark_reg_as_referenced, NULL);
- AND_HARD_REG_SET (referenced_regs, hard_regs_saved);
+ referenced_regs &= hard_regs_saved;
}
for (regno = 0; regno < FIRST_PSEUDO_REGISTER; regno++)
@@ -857,7 +857,7 @@ save_call_clobbered_regs (void)
AND_COMPL_HARD_REG_SET (hard_regs_to_save, hard_regs_saved);
get_call_reg_set_usage (insn, &call_def_reg_set,
call_used_reg_set);
- AND_HARD_REG_SET (hard_regs_to_save, call_def_reg_set);
+ hard_regs_to_save &= call_def_reg_set;
for (regno = 0; regno < FIRST_PSEUDO_REGISTER; regno++)
if (TEST_HARD_REG_BIT (hard_regs_to_save, regno))