This is the mail archive of the
mailing list for the GCC project.
Re: -fuse-caller-save - Collect register usage information
- From: Richard Henderson <rth at redhat dot com>
- To: Jan Hubicka <hubicka at ucw dot cz>
- Cc: Tom de Vries <Tom_deVries at mentor dot com>, Eric Botcazou <ebotcazou at adacore dot com>, gcc-patches at gcc dot gnu dot org, rdsandiford at googlemail dot com
- Date: Thu, 19 Jun 2014 12:45:35 -0700
- Subject: Re: -fuse-caller-save - Collect register usage information
- Authentication-results: sourceware.org; auth=none
- References: <534ED7BC dot 50300 at mentor dot com> <878uqwgjoe dot fsf at talisman dot default> <535BABD1 dot 8050208 at mentor dot com> <1426417 dot RtLpSRnsYv at polaris> <537A1583 dot 7020702 at mentor dot com> <53A27162 dot 7070208 at redhat dot com> <53A30A69 dot 7060905 at mentor dot com> <53A30F3B dot 5000801 at redhat dot com> <20140619193606 dot GA32714 at kam dot mff dot cuni dot cz>
On 06/19/2014 12:36 PM, Jan Hubicka wrote:
>> On 06/19/2014 09:06 AM, Tom de Vries wrote:
>>> 2014-06-19 Tom de Vries <firstname.lastname@example.org>
>>> * final.c (collect_fn_hard_reg_usage): Don't save function_used_regs if
>>> it contains all call_used_regs.
> When we now have way to represent different reg usages for functions, what would be best
> way to make local functions to default into saving some SSE registers on x86/x86-64?
I wouldn't do that at all. Leave all sse registers call-clobbered. This way
you don't need to have different entry points (or one possibly less efficient
entry point) when a function is used both locally and globally.
What I would investigate is how to use this hard reg usage data in the register
allocator. If we know that the callee only uses xmm0-xmm4, then we can keep
xmm5-xmm15 live across the call.