This is the mail archive of the
gcc-patches@gcc.gnu.org
mailing list for the GCC project.
Re: [PATCH, i386] Enable fuse-caller-save for i386
- From: Uros Bizjak <ubizjak at gmail dot com>
- To: Tom de Vries <Tom_deVries at mentor dot com>
- Cc: GCC Patches <gcc-patches at gcc dot gnu dot org>
- Date: Fri, 30 May 2014 13:04:47 +0200
- Subject: Re: [PATCH, i386] Enable fuse-caller-save for i386
- Authentication-results: sourceware.org; auth=none
- References: <5388534C dot 9090900 at mentor dot com>
On Fri, May 30, 2014 at 11:45 AM, Tom de Vries <Tom_deVries@mentor.com> wrote:
> This patch enables the fuse-caller-save optimization for i386.
>
> It sets the hook TARGET_CALL_FUSAGE_CONTAINS_NON_CALLEE_CLOBBERS to true.
>
> The definition of the hook is:
> ...
> set to true if all the calls in the current function contain clobbers in
> CALL_INSN_FUNCTION_USAGE for the registers that are clobbered by the call
> rather than by the callee, and are not already set or clobbered in the call
> pattern. Examples of such registers are registers used in PLTs and stubs,
> and temporary registers used in the call instruction but not present in the
> rtl pattern. Another way to formulate it is the registers not present in the
> rtl pattern that are clobbered by the call assuming the callee does not
> clobber any register. The default version of this hook is set to false.
> ...
>
> Bootstrapped and reg-tested this patch on x86_64, no issues found.
>
> Is it in fact safe to set this hook to true for i386? Are there clobbers
> which need to be added?
>
> If it's safe to set this hook to true, OK for trunk?
AFAIK, this is true for all targets, including cross-calls between MS
and SYSV ABIs, so I'd say OK.
Uros.