diff options
author | Richard Sandiford <richard.sandiford@arm.com> | 2019-09-30 16:20:34 +0000 |
---|---|---|
committer | Richard Sandiford <rsandifo@gcc.gnu.org> | 2019-09-30 16:20:34 +0000 |
commit | 559c1ae100489da76a0283750361ace146fdeb77 (patch) | |
tree | 6238d410e3406f7e900ba46b953b23812bf93a7a | |
parent | c92503717bd0c3a0706f8c9626c47d49d901063b (diff) | |
download | gcc-559c1ae100489da76a0283750361ace146fdeb77.zip gcc-559c1ae100489da76a0283750361ace146fdeb77.tar.gz gcc-559c1ae100489da76a0283750361ace146fdeb77.tar.bz2 |
Remove global call sets: DF (entry/exit defs)
The code patched here is seeing whether the current function
needs to save at least part of a register before using it.
2019-09-30 Richard Sandiford <richard.sandiford@arm.com>
gcc/
* df-scan.c (df_get_entry_block_def_set): Use crtl->abi to test
whether the current function needs to save at least part of a
register before using it.
(df_get_exit_block_use_set): Likewise for epilogue restores.
From-SVN: r276320
-rw-r--r-- | gcc/ChangeLog | 7 | ||||
-rw-r--r-- | gcc/df-scan.c | 9 |
2 files changed, 13 insertions, 3 deletions
diff --git a/gcc/ChangeLog b/gcc/ChangeLog index 13caa91..3617216 100644 --- a/gcc/ChangeLog +++ b/gcc/ChangeLog @@ -1,5 +1,12 @@ 2019-09-30 Richard Sandiford <richard.sandiford@arm.com> + * df-scan.c (df_get_entry_block_def_set): Use crtl->abi to test + whether the current function needs to save at least part of a + register before using it. + (df_get_exit_block_use_set): Likewise for epilogue restores. + +2019-09-30 Richard Sandiford <richard.sandiford@arm.com> + * df-problems.c: Include regs.h and function-abi.h. (df_rd_problem_data): Rename sparse_invalidated_by_call to sparse_invalidated_by_eh and dense_invalidated_by_call to diff --git a/gcc/df-scan.c b/gcc/df-scan.c index 7dda4ca..36012b7 100644 --- a/gcc/df-scan.c +++ b/gcc/df-scan.c @@ -3499,7 +3499,9 @@ df_get_entry_block_def_set (bitmap entry_block_defs) /* Defs for the callee saved registers are inserted so that the pushes have some defining location. */ for (i = 0; i < FIRST_PSEUDO_REGISTER; i++) - if ((call_used_or_fixed_reg_p (i) == 0) && (df_regs_ever_live_p (i))) + if (!crtl->abi->clobbers_full_reg_p (i) + && !fixed_regs[i] + && df_regs_ever_live_p (i)) bitmap_set_bit (entry_block_defs, i); } @@ -3672,8 +3674,9 @@ df_get_exit_block_use_set (bitmap exit_block_uses) { /* Mark all call-saved registers that we actually used. */ for (i = 0; i < FIRST_PSEUDO_REGISTER; i++) - if (df_regs_ever_live_p (i) && !LOCAL_REGNO (i) - && !TEST_HARD_REG_BIT (regs_invalidated_by_call, i)) + if (df_regs_ever_live_p (i) + && !LOCAL_REGNO (i) + && !crtl->abi->clobbers_full_reg_p (i)) bitmap_set_bit (exit_block_uses, i); } |