Fix IRA issue, PR79728
Jeff Law
law@redhat.com
Tue Mar 14 17:44:00 GMT 2017
On 03/03/2017 06:51 AM, Bernd Schmidt wrote:
> This is an ICE where setup_pressure_classes fails if xmm0 is a global
> reg. Instead of GENERAL/FLOAT/SSE/MMX_REGS, it computes only
> SSE_FIRST_REG as the third register class. The problem is that the costs
> for moving between SSE_FIRST_REG and SSE_REGS are inflated because we
> think we have no available registers in SSE_FIRST_REG (since the only
> register in that class is global), and that somewhat confuses the
> algorithm.
>
> The following fixes it by tweaking contains_regs_of_mode. Out of
> caution, I've retained the old meaning for code in reload which uses this.
>
> Bootstrapped and tested on x86_64-linux. Ok?
>
>
> Bernd
>
> global-reg-cost.diff
>
>
> PR rtl-optimization/79728
> * regs.h (struct target_regs): New field
> x_contains_allocatable_regs_of_mode.
> (contains_allocatable_regs_of_mode): New macro.
> * reginfo.c (init_reg_sets_1): Initialize it, and change
> contains_reg_of_mode so it includes global regs as well.
> * reload.c (push_reload): Use contains_allocatable_regs_of_mode
> rather thanc ontains_regs_of_mode.
>
> PR rtl-optimization/79728
> * gcc.target/i386/sse-globalreg.c: New test.
OK.
jeff
More information about the Gcc-patches
mailing list