diff options
author | Richard Sandiford <richard.sandiford@arm.com> | 2019-09-10 18:56:31 +0000 |
---|---|---|
committer | Richard Sandiford <rsandifo@gcc.gnu.org> | 2019-09-10 18:56:31 +0000 |
commit | 026116ce2a4dedad81518b0ca89dd8243b545778 (patch) | |
tree | 28a5af82fb797ac35103431c00f3c8fbcd0dc2f8 /gcc/caller-save.c | |
parent | df1f0eef67939274e9ddd3df426e8dfc5184086b (diff) | |
download | gcc-026116ce2a4dedad81518b0ca89dd8243b545778.zip gcc-026116ce2a4dedad81518b0ca89dd8243b545778.tar.gz gcc-026116ce2a4dedad81518b0ca89dd8243b545778.tar.bz2 |
Remove no_caller_save_reg_set
Reusing the reasoning from the call_fixed_reg_set patch:
for (i = 0; i < FIRST_PSEUDO_REGISTER; i++)
for (j = 1; j <= MOVE_MAX_WORDS; j++)
if (reg_save_code (i,regno_save_mode[i][j]) == -1)
should be true whenever regno_save_mode[i][j] == VOIDmode,
which it is for:
~call_used_reg_set | ~have_save_mode
So this condition amounts to:
~call_used_reg_set | ~have_save_mode | ~have_save_insn
== ~call_used_reg_set | ~savable_regs
no_caller_save_reg_set is then set if call_used_regs[i], so
no_caller_save_reg_set is:
call_used_reg_set & (~call_used_reg_set | ~savable_regs)
== call_used_reg_set & ~savable_regs
This patch expands its single user accordingly.
Note that ~savable_regs is always empty on LRA targets.
2019-09-10 Richard Sandiford <richard.sandiford@arm.com>
gcc/
* hard-reg-set.h (target_hard_regs::x_no_caller_save_reg_set): Delete.
(no_caller_save_reg_set): Delete.
* caller-save.c (init_caller_save): Don't initialize it.
* ira-conflicts.c (ira_build_conflicts): Calculate
no_caller_save_reg_set locally from call_used_reg_set and savable_regs.
From-SVN: r275599
Diffstat (limited to 'gcc/caller-save.c')
-rw-r--r-- | gcc/caller-save.c | 7 |
1 files changed, 1 insertions, 6 deletions
diff --git a/gcc/caller-save.c b/gcc/caller-save.c index 05fbc44..58ea14f 100644 --- a/gcc/caller-save.c +++ b/gcc/caller-save.c @@ -192,7 +192,6 @@ init_caller_save (void) caller_save_initialized_p = true; - CLEAR_HARD_REG_SET (no_caller_save_reg_set); /* First find all the registers that we need to deal with and all the modes that they can have. If we can't find a mode to use, we can't have the register live over calls. */ @@ -264,11 +263,7 @@ init_caller_save (void) { regno_save_mode[i][j] = VOIDmode; if (j == 1) - { - CLEAR_HARD_REG_BIT (savable_regs, i); - if (call_used_regs[i]) - SET_HARD_REG_BIT (no_caller_save_reg_set, i); - } + CLEAR_HARD_REG_BIT (savable_regs, i); } } |