aboutsummaryrefslogtreecommitdiff
path: root/gcc/reload1.c
diff options
context:
space:
mode:
authorRichard Sandiford <richard.sandiford@arm.com>2019-09-09 17:59:19 +0000
committerRichard Sandiford <rsandifo@gcc.gnu.org>2019-09-09 17:59:19 +0000
commit44942965f4eae141bd1f8300e7f77d0c9a3936e4 (patch)
tree4813d3c9507c4d469a9cc04f2662bae23d1b3e58 /gcc/reload1.c
parentdc333d8ff60909dbed89126443e3024f1592f8a4 (diff)
downloadgcc-44942965f4eae141bd1f8300e7f77d0c9a3936e4.zip
gcc-44942965f4eae141bd1f8300e7f77d0c9a3936e4.tar.gz
gcc-44942965f4eae141bd1f8300e7f77d0c9a3936e4.tar.bz2
Remove IOR_HARD_REG_SET
Use "x |= y" instead of "IOR_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. (IOR_HARD_REG_SET): Delete. * config/gcn/gcn.c (gcn_md_reorg): Use "|" instead of IOR_HARD_REG_SET. * config/m32c/m32c.c (m32c_register_move_cost): Likewise. * config/s390/s390.c (s390_adjust_loop_scan_osc): Likewise. * final.c (collect_fn_hard_reg_usage): Likewise. * hw-doloop.c (scan_loop, optimize_loop): Likewise. * ira-build.c (merge_hard_reg_conflicts): Likewise. (ior_hard_reg_conflicts, create_cap_allocno, propagate_allocno_info) (propagate_some_info_from_allocno): Likewise. (copy_info_to_removed_store_destinations): Likewise. * ira-color.c (add_allocno_hard_regs_to_forest, assign_hard_reg) (allocno_reload_assign, ira_reassign_pseudos): Likewise. (fast_allocation): Likewise. * ira-conflicts.c (ira_build_conflicts): Likewise. * ira-lives.c (make_object_dead, process_single_reg_class_operands) (process_bb_node_lives): Likewise. * ira.c (setup_pressure_classes, setup_reg_class_relations): Likewise. * lra-assigns.c (find_hard_regno_for_1): Likewise. (setup_live_pseudos_and_spill_after_risky_transforms): Likewise. * lra-constraints.c (process_alt_operands, inherit_in_ebb): Likewise. * lra-eliminations.c (spill_pseudos, update_reg_eliminate): Likewise. * lra-lives.c (mark_pseudo_dead, check_pseudos_live_through_calls) (process_bb_lives): Likewise. * lra-spills.c (assign_spill_hard_regs): Likewise. * postreload.c (reload_combine): Likewise. * reginfo.c (init_reg_sets_1): Likewise. * regrename.c (merge_overlapping_regs, find_rename_reg) (merge_chains): Likewise. * reload1.c (maybe_fix_stack_asms, order_regs_for_reload, find_reg) (find_reload_regs, finish_spills, choose_reload_regs_init) (emit_reload_insns): Likewise. * reorg.c (redundant_insn): Likewise. * resource.c (find_dead_or_set_registers, mark_set_resources) (mark_target_live_regs): Likewise. * rtlanal.c (find_all_hard_reg_sets): Likewise. * sched-deps.c (sched_analyze_insn): Likewise. * sel-sched.c (mark_unavailable_hard_regs): Likewise. (find_best_reg_for_expr): Likewise. * shrink-wrap.c (try_shrink_wrapping): Likewise. From-SVN: r275531
Diffstat (limited to 'gcc/reload1.c')
-rw-r--r--gcc/reload1.c25
1 files changed, 11 insertions, 14 deletions
diff --git a/gcc/reload1.c b/gcc/reload1.c
index 7aa3f85..6c95c9c 100644
--- a/gcc/reload1.c
+++ b/gcc/reload1.c
@@ -1364,7 +1364,7 @@ maybe_fix_stack_asms (void)
{
/* End of one alternative - mark the regs in the current
class, and reset the class. */
- IOR_HARD_REG_SET (allowed, reg_class_contents[cls]);
+ allowed |= reg_class_contents[cls];
cls = NO_REGS;
p++;
if (c == '#')
@@ -1745,8 +1745,8 @@ order_regs_for_reload (class insn_chain *chain)
REG_SET_TO_HARD_REG_SET (used_by_pseudos, &chain->live_throughout);
REG_SET_TO_HARD_REG_SET (used_by_pseudos2, &chain->dead_or_set);
- IOR_HARD_REG_SET (bad_spill_regs, used_by_pseudos);
- IOR_HARD_REG_SET (bad_spill_regs, used_by_pseudos2);
+ bad_spill_regs |= used_by_pseudos;
+ bad_spill_regs |= used_by_pseudos2;
/* Now find out which pseudos are allocated to it, and update
hard_reg_n_uses. */
@@ -1823,8 +1823,7 @@ find_reg (class insn_chain *chain, int order)
static int regno_pseudo_regs[FIRST_PSEUDO_REGISTER];
static int best_regno_pseudo_regs[FIRST_PSEUDO_REGISTER];
- not_usable = bad_spill_regs;
- IOR_HARD_REG_SET (not_usable, bad_spill_regs_global);
+ not_usable = bad_spill_regs | bad_spill_regs_global;
IOR_COMPL_HARD_REG_SET (not_usable, reg_class_contents[rl->rclass]);
CLEAR_HARD_REG_SET (used_by_other_reload);
@@ -2008,7 +2007,7 @@ find_reload_regs (class insn_chain *chain)
}
chain->used_spill_regs = used_spill_regs_local;
- IOR_HARD_REG_SET (used_spill_regs, used_spill_regs_local);
+ used_spill_regs |= used_spill_regs_local;
memcpy (chain->rld, rld, n_reloads * sizeof (struct reload));
}
@@ -4251,14 +4250,12 @@ finish_spills (int global)
EXECUTE_IF_SET_IN_REG_SET
(&chain->live_throughout, FIRST_PSEUDO_REGISTER, i, rsi)
{
- IOR_HARD_REG_SET (pseudo_forbidden_regs[i],
- chain->used_spill_regs);
+ pseudo_forbidden_regs[i] |= chain->used_spill_regs;
}
EXECUTE_IF_SET_IN_REG_SET
(&chain->dead_or_set, FIRST_PSEUDO_REGISTER, i, rsi)
{
- IOR_HARD_REG_SET (pseudo_forbidden_regs[i],
- chain->used_spill_regs);
+ pseudo_forbidden_regs[i] |= chain->used_spill_regs;
}
}
@@ -4302,7 +4299,7 @@ finish_spills (int global)
{
REG_SET_TO_HARD_REG_SET (used_by_pseudos, &chain->live_throughout);
REG_SET_TO_HARD_REG_SET (used_by_pseudos2, &chain->dead_or_set);
- IOR_HARD_REG_SET (used_by_pseudos, used_by_pseudos2);
+ used_by_pseudos |= used_by_pseudos2;
compute_use_by_pseudos (&used_by_pseudos, &chain->live_throughout);
compute_use_by_pseudos (&used_by_pseudos, &chain->dead_or_set);
@@ -6239,9 +6236,9 @@ choose_reload_regs_init (class insn_chain *chain, rtx *save_reload_reg_rtx)
{
HARD_REG_SET tmp;
REG_SET_TO_HARD_REG_SET (tmp, &chain->live_throughout);
- IOR_HARD_REG_SET (reg_used_in_insn, tmp);
+ reg_used_in_insn |= tmp;
REG_SET_TO_HARD_REG_SET (tmp, &chain->dead_or_set);
- IOR_HARD_REG_SET (reg_used_in_insn, tmp);
+ reg_used_in_insn |= tmp;
compute_use_by_pseudos (&reg_used_in_insn, &chain->live_throughout);
compute_use_by_pseudos (&reg_used_in_insn, &chain->dead_or_set);
}
@@ -8420,7 +8417,7 @@ emit_reload_insns (class insn_chain *chain)
}
}
}
- IOR_HARD_REG_SET (reg_reloaded_dead, reg_reloaded_died);
+ reg_reloaded_dead |= reg_reloaded_died;
}
/* Go through the motions to emit INSN and test if it is strictly valid.