This is the mail archive of the
gcc-patches@gcc.gnu.org
mailing list for the GCC project.
Re: [PATCH][IRA] Analysis of register usage of functions for usage by IRA.
- From: "Ulrich Weigand" <uweigand at de dot ibm dot com>
- To: Tom_deVries at mentor dot com (Tom de Vries)
- Cc: vmakarov at redhat dot com (Vladimir Makarov), stevenb dot gcc at gmail dot com (Steven Bosscher), gcc-patches at gcc dot gnu dot org (gcc-patches at gcc dot gnu dot org), robradovic at mips dot com (Radovan Obradovic)
- Date: Wed, 3 Sep 2014 20:12:30 +0200 (CEST)
- Subject: Re: [PATCH][IRA] Analysis of register usage of functions for usage by IRA.
- Authentication-results: sourceware.org; auth=none
Tom de Vries wrote:
> thanks for noticing this. I agree, this looks wrong, and is probably an
> oversight. [ It seems that s390 is the only target defining
> IRA_HARD_REGNO_ADD_COST_MULTIPLIER, so this problem didn't show up on any other
> target. ]
>
> I think attached patch fixes it.
>
> I've build the patch and ran the fuse-caller-save tests, and I'm currently
> bootstrapping and reg-testing it on x86_64.
Thanks!
> Can you check whether this patches fixes the issue for s390 ?
Yes, this (which is equivalent to a patch I had been using) does fix
the s390 issue again.
Just for my curiosity, why is the second condition (after &&)
needed in this clause in the first place?
> if (ira_hard_reg_set_intersection_p (regno, mode,
> + *crossed_calls_clobber_regs)
> + && (ira_hard_reg_set_intersection_p (regno, mode,
> call_used_reg_set)
> - || HARD_REGNO_CALL_PART_CLOBBERED (regno, mode))
If a register is in crossed_calls_clobber_regs, can it ever *not*
be a call-clobbered register?
Bye,
Ulrich
--
Dr. Ulrich Weigand
GNU/Linux compilers and toolchain
Ulrich.Weigand@de.ibm.com