From 0b0310e9a0e0d553bbe9f961c52e0851328aa8b0 Mon Sep 17 00:00:00 2001 From: Richard Sandiford Date: Mon, 9 Sep 2019 18:01:55 +0000 Subject: Remove global REG_SETs We currently maintain global REG_SET versions of fixed_reg_set and regs_invalidated_by_call. With bitmap_view, we can instead operate directly on the underlying HARD_REG_SETs, avoiding the need to keep the two pieces of data in sync. I have a series of patches that removes the assumption that there's a single global ABI for all functions in the translation unit, which includes not relying on having a global regs_invalidated_by_call. Removing the REG_SET equivalent is one step to doing that. Note that the affected DF code is used for EH edges or dumping only, so shouldn't be performance critical. 2019-09-09 Richard Sandiford gcc/ * regset.h (regs_invalidated_by_call_regset): Delete. (fixed_reg_set_regset): Likewise. * reginfo.c (regs_invalidated_by_call_regset): Likewise. (fixed_reg_set_regset, persistent_obstack): Likewise. (init_reg_sets_1, globalize_reg): Update accordingly. * df.h (df_print_regset, df_print_word_regset): Take a const_bitmap instead of a bitmap. * df-core.c (df_print_regset, df_print_word_regset): Likewise. * df-problems.c (df_rd_local_compute): Use regs_invalidated_by_call instead of regs_invalidated_by_call_regset. (df_lr_confluence_n, df_md_confluence_n): Likewise. * df-scan.c (df_scan_start_dump): Likewise. * dse.c (copy_fixed_regs): Likewise. * config/sh/sh.c (sh_find_equiv_gbr_addr): Likewise. From-SVN: r275537 --- gcc/config/sh/sh.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'gcc/config/sh') diff --git a/gcc/config/sh/sh.c b/gcc/config/sh/sh.c index 7cc8857..b2fb56c 100644 --- a/gcc/config/sh/sh.c +++ b/gcc/config/sh/sh.c @@ -11695,7 +11695,7 @@ sh_find_equiv_gbr_addr (rtx_insn* insn, rtx mem) { if (CALL_P (DF_REF_INSN (d))) { - if (REGNO_REG_SET_P (regs_invalidated_by_call_regset, GBR_REG)) + if (TEST_HARD_REG_BIT (regs_invalidated_by_call, GBR_REG)) return NULL_RTX; else continue; -- cgit v1.1