This is the mail archive of the
mailing list for the GCC project.
Re: -fuse-caller-save - Collect register usage information
- From: Bill Schmidt <wschmidt at linux dot vnet dot ibm dot com>
- To: Tom de Vries <Tom_deVries at mentor dot com>
- Cc: Eric Botcazou <ebotcazou at adacore dot com>, gcc-patches at gcc dot gnu dot org, Jan Hubicka <hubicka at ucw dot cz>, rdsandiford at googlemail dot com
- Date: Wed, 28 May 2014 17:42:24 -0500
- 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>
Tom, the final version of this patch that you committed breaks bootstrap
on powerpc64le-linux-gnu. The problem is that all uses of the variable
i are guarded by #ifdef STACK_REGS, but the declaration of i is
unconditional. We get an unused variable warning that becomes an error
during stage 3.
On Mon, 2014-05-19 at 16:30 +0200, Tom de Vries wrote:
> On 17-05-14 12:51, Eric Botcazou wrote:
> >> This is the updated version of the previously approved patch
> >> submitted here (http://gcc.gnu.org/ml/gcc-patches/2013-03/msg01320.html ).
> >> The changes are:
> >> - using a new hook call_fusage_contains_non_callee_clobbers,
> >> - incorporating minor review comments from Richard Sandiford
> >> ( http://gcc.gnu.org/ml/gcc-patches/2014-04/msg01436.html ).
> >> As part of the fuse-caller-save patch series, bootstrapped and reg-tested on
> >> x86_64, and build and reg-tested on MIPS.
> >> Eric, non-cgraph part OK for trunk?
> thanks for the review.
> > I think we should consider creating a new rule: for every target hook added,
> > another must be first removed...
> > So this call_fusage_contains_non_callee_clobbers is essentially only a stop
> > gap measure for the ports that haven't been changed yet?
> I think so.
> > If so, please add a
> > ??? comment at the beginning of collect_fn_hard_reg_usage:
> > /* ??? To be removed when all the ports have been fixed. */
> > if (!targetm.call_fusage_contains_non_callee_clobbers)
> > and invoke collect_fn_hard_reg_usage from rest_of_handle_final only when
> > flag_use_caller_save is true.
> > Why do you need to retest them in get_call_reg_set_usage and get_call_fndecl?
> The test for flag_use_caller-save in get_call_fndecl was unnecessary, I've
> removed it.
> The test in get_call_reg_set_usage for flag_use_caller_save and the hook is
> strictly speaking not necessary. But it's the interface function to retrieve the
> collected register usage information, so it seems a good location to do an
> early-out. I've left it in for now.
> Bootstrapped and reg-tested on x86_64.
> non-cgraph part OK for trunk?
> - Tom