This is the mail archive of the gcc-patches@gcc.gnu.org mailing list for the GCC project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

Re: [PATCH, i386] Enable fuse-caller-save for i386


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.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]