arm: Factorize several occurrences of the same code into reg_needs_saving_p
authorChristophe Lyon <christophe.lyon@linaro.org>
Mon, 4 May 2020 13:41:34 +0000 (13:41 +0000)
committerChristophe Lyon <christophe.lyon@linaro.org>
Thu, 14 May 2020 15:38:24 +0000 (15:38 +0000)
commit4036327e4cab5c9a0235bb784b02d5a06a614065
tree4b9785dc66667ce1525c1b6f591c93070576d69b
parentf664bd07f081d08a3c30b95eab01e7ed1329700c
arm: Factorize several occurrences of the same code into reg_needs_saving_p

The same code pattern occurs in several functions, so it seems cleaner
to move it into a dedicated function.

2020-05-14  Christophe Lyon  <christophe.lyon@linaro.org>

gcc/
* config/arm/arm.c (reg_needs_saving_p): New function.
(use_return_insn): Use reg_needs_saving_p.
(arm_get_vfp_saved_size): Likewise.
(arm_compute_frame_layout): Likewise.
(arm_save_coproc_regs): Likewise.
(thumb1_expand_epilogue): Likewise.
(arm_expand_epilogue_apcs_frame): Likewise.
(arm_expand_epilogue): Likewise.
gcc/ChangeLog
gcc/config/arm/arm.c