Remove global call sets: reload.c
authorRichard Sandiford <richard.sandiford@arm.com>
Mon, 30 Sep 2019 16:21:23 +0000 (16:21 +0000)
committerRichard Sandiford <rsandifo@gcc.gnu.org>
Mon, 30 Sep 2019 16:21:23 +0000 (16:21 +0000)
commit12e20dde63c77eb696118e2624aacf8f11feb1f9
treebaf1093742a2c8d72ba9e0becb9df4f9ce65a9bf
parent0ce77f463d1d150e70a91807502d628492ca7ae5
Remove global call sets: reload.c

The inheritance code in find_equiv_reg can use clobbers_reg_p
to test whether a call clobbers either of the equivalent registers.

reload and find_reg use crtl->abi to test whether a register needs
to be saved in the prologue before use.

reload_as_needed can use full_and_partial_reg_clobbers and thus
avoid needing to keep its own record of which registers are part
call-clobbered.

2019-09-30  Richard Sandiford  <richard.sandiford@arm.com>

gcc/
* reload.c: Include function-abi.h.
(find_equiv_reg): Use clobbers_reg_p to test whether either
of the equivalent registers is clobbered by a call.
* reload1.c: Include function-abi.h.
(reg_reloaded_call_part_clobbered): Delete.
(reload): Use crtl->abi to test which registers would need
saving in the prologue before use.
(find_reg): Likewise.
(emit_reload_insns): Remove code for reg_reloaded_call_part_clobbered.
(reload_as_needed): Likewise.  Use full_and_partial_reg_clobbers
instead of call_used_or_fixed_regs | reg_reloaded_call_part_clobbered.

From-SVN: r276333
gcc/ChangeLog
gcc/reload.c
gcc/reload1.c