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, 16 Apr 2014 12:43:59 +0100
- 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> <87fvopnl67 dot fsf at talisman dot default> <52D72860 dot 8060200 at mentor dot com> <8761pkny3h dot fsf at talisman dot default> <534E5166 dot 6020709 at mentor dot com> <87k3appo0c dot fsf at sandifor-thinkpad dot stglab dot manchester dot uk dot ibm dot com> <534E6507 dot 7020000 at mentor dot com>
Tom de Vries <Tom_deVries@mentor.com> writes:
> On 16/04/14 12:28, Richard Sandiford wrote:
>>> > This patch introduces a hook that specifies which registers are implicitly
>>> > clobbered by a call, not including the registers that are clobbered in the
>>> > called function, and then uses that hook to add those registers to
>>> > CALL_INSN_FUNCTION_USAGE.
>
>> I don't think a new hook is needed.
>
> Richard,
>
> the hook enables us to determine whether a target supplies the information
> provided by the hook. If the target does not provide this information, the
> fuse-caller-save optimization is possibly not safe.
>
> How do you propose to handle this without this hook?
Maybe we should just have a bool field in the target structure to say
whether -fuse-caller-save is supported, a bit like delay_sched2.
Thanks,
Richard