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: Tom de Vries <Tom_deVries at mentor dot com>
- To: <rdsandiford at googlemail 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 13:09:59 +0200
- 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>
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?
Apart from that, I don't see the reason why we should add similar code to
several targets, if we can add a hook that specifies information about the
target, and add generic code that handles the information.
Thanks,
- Tom