This is the mail archive of the
mailing list for the GCC project.
Re: [26/32] Remove global call sets: regrename.c
- From: Jeff Law <law at redhat dot com>
- To: gcc-patches at gcc dot gnu dot org, richard dot sandiford at arm dot com
- Date: Sun, 29 Sep 2019 16:25:18 -0600
- Subject: Re: [26/32] Remove global call sets: regrename.c
- References: <firstname.lastname@example.org> <email@example.com>
On 9/11/19 1:16 PM, Richard Sandiford wrote:
> This patch makes regrename use a similar mask-and-clobber-set
> pair to IRA when tracking whether registers are clobbered by
> calls in a region. Testing for a nonzero ABI mask is equivalent
> to testing for a register that crosses a call.
> Since AArch64 and c6x use regrename.h, they need to be updated
> to include function-abi.h first. AIUI this is preferred over
> including function-abi.h in regrename.h.
> 2019-09-11 Richard Sandiford <firstname.lastname@example.org>
> * regrename.h (du_head::call_clobber_mask): New field.
> (du_head::need_caller_save_reg): Replace with...
> (du_head::call_abis): ...this new field.
> * regrename.c: Include function-abi.h.
> (call_clobbered_in_chain_p): New function.
> (check_new_reg_p): Use crtl->abi when deciding whether a register
> is free for use after RA. Use call_clobbered_in_chain_p to test
> whether a candidate register would be clobbered by a call.
> (find_rename_reg): Don't add call-clobber conflicts here.
> (rename_chains): Check call_abis instead of need_caller_save_reg.
> (merge_chains): Update for changes to du_head.
> (build_def_use): Use call_insn_abi to get the ABI of the call insn
> target. Record the ABI identifier in call_abis and the set of
> fully or partially clobbered registers in call_clobber_mask.
> Add fully-clobbered registers to hard_conflicts here rather
> than in find_rename_reg.
> * config/aarch64/cortex-a57-fma-steering.c: Include function-abi.h.
> (rename_single_chain): Check call_abis instead of need_caller_save_reg.
> * config/aarch64/falkor-tag-collision-avoidance.c: Include
> * config/c6x/c6x.c: Likewise.