This is the mail archive of the
gcc-patches@gcc.gnu.org
mailing list for the GCC project.
Re: [PATCH] register CALL_INSN_FUNCTION_USAGE in find_all_hard_reg_sets
- From: Richard Sandiford <rdsandiford at googlemail dot com>
- To: Tom de Vries <Tom_deVries at mentor dot com>
- Cc: Eric Botcazou <ebotcazou at adacore dot com>, GCC Patches <gcc-patches at gcc dot gnu dot org>
- Date: Wed, 15 Jan 2014 18:40:16 +0000
- Subject: Re: [PATCH] register CALL_INSN_FUNCTION_USAGE in find_all_hard_reg_sets
- Authentication-results: sourceware.org; auth=none
- References: <52D6BCFC dot 6000408 at mentor dot com>
Tom de Vries <Tom_deVries@mentor.com> writes:
> This patch adds scanning of clobbers in CALL_INSN_FUNCTION_USAGE to
> find_all_hard_reg_sets.
>
> For MIPS, calls are split at some point. After the split, one of the
> resulting insns may clobber $6. But before the split, that's not
> explicit in the rtl representation of the unsplit call.
>
> For -fuse-caller-save, that's a problem, and Richard S. suggested to
> add the clobber of $6 to the CALL_INSN_FUNCTION_USAGE of the unsplit
> call.
Maybe here's a good place to raise this, but I was hoping all targets
could use CALL_INSN_FUNCTION_USAGE and we'd be able to drop the new
hook for -fuse-caller-save. That seems better than adding another
place that needs to be checked when figuring out what a call clobbers.
In other words, I didn't want MIPS to be different from the other targets.
If we decide to keep the hook then MIPS should use it too.
Thanks,
Richard