This is the mail archive of the
gcc-patches@gcc.gnu.org
mailing list for the GCC project.
Re: fuse-caller-save - hook format
- From: Tom de Vries <Tom_deVries at mentor dot com>
- To: <rdsandiford at googlemail dot com>, Richard Earnshaw <rearnsha at arm dot com>
- Cc: "gcc-patches at gcc dot gnu dot org" <gcc-patches at gcc dot gnu dot org>, Eric Botcazou <ebotcazou at adacore dot com>
- Date: Tue, 22 Apr 2014 19:13:38 +0200
- Subject: Re: fuse-caller-save - hook format
- Authentication-results: sourceware.org; auth=none
- References: <534ED7BC dot 50300 at mentor dot com> <534FF0F9 dot 60404 at redhat dot com> <87lhv4ug7f dot fsf at sandifor-thinkpad dot stglab dot manchester dot uk dot ibm dot com> <53500628 dot 2090802 at redhat dot com> <5356853D dot 8050905 at mentor dot com> <87r44ptmep dot fsf at sandifor-thinkpad dot stglab dot manchester dot uk dot ibm dot com> <53569443 dot 3090201 at mentor dot com> <87fvl5tk1h dot fsf at sandifor-thinkpad dot stglab dot manchester dot uk dot ibm dot com>
On 22-04-14 18:18, Richard Sandiford wrote:
Tom de Vries <Tom_deVries@mentor.com> writes:
On 22-04-14 17:27, Richard Sandiford wrote:
Tom de Vries <Tom_deVries@mentor.com> writes:
2. post_expand_call_insn.
A utility hook to facilitate adding the clobbers to CALL_INSN_FUNCTION_USAGE.
Why is this needed though? Like I say, I think targets should update
CALL_INSN_FUNCTION_USAGE when emitting calls as part of the call expander.
Splitting the functionality of the call expanders across the define_expand
and a new hook just makes things unnecessarily complicated IMO.
Richard,
It is not needed, but it is convenient.
There are targets where the define_expands for calls use the rtl template.
Having to add clobbers to the CALL_INSN_FUNCTION_USAGE for such a target means
you cannot use the rtl template any more and instead need to generate
all needed
RTL insns in C code.
This hook means that you can keep using the rtl template, which is less
intrusive for those targets.
[ switching order of questions ]
Which target do you have in mind?
Aarch64.
> But if the target is simple enough to use a single call pattern for call
> cases, wouldn't it be possible to add the clobber directly to the call
> pattern?
I think that can be done, but that feels intrusive as well. I thought the reason
that we added these clobbers to CALL_INSN_FUNCTION_USAGE was exactly because we
did not want to add them to the rtl patterns?
But, if the maintainer is fine with that, so am I.
Richard Earnshaw,
are you ok with adding the IP0_REGNUM/IP1_REGNUM clobbers to all the call
patterns in the Aarch64 target?
The alternatives are:
- rewrite the call expansions not to use the rtl templates, and add the clobbers
there to CALL_INSN_FUNCTION_USAGE
- get the post_expand_call_insn hook approved and use that to add the clobbers
to CALL_INSN_FUNCTION_USAGE.
what is your preference?
Thanks,
- Tom