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.
Thanks, Bill 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? > > > > Eric, > > 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) > > > > Done. > > > and invoke collect_fn_hard_reg_usage from rest_of_handle_final only when > > flag_use_caller_save is true. > > > > Done. > > > 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? > > Thanks, > - Tom