gcc-patches@gcc.gnu.org
[Top] [All Lists]

Re: PATCH: PR target/40470: unable to find a register to spill in class

Subject: Re: PATCH: PR target/40470: unable to find a register to spill in class ‘SSE_FIRST_REG’
From: Richard Guenther
Date: Thu, 18 Jun 2009 12:44:39 +0200
On Thu, Jun 18, 2009 at 12:23 PM, Steven Bosscher<stevenb.gcc@xxxxxxxxx> wrote:
> On 6/18/09, Ian Lance Taylor <iant@xxxxxxxxxx> wrote:
>> Vladimir Makarov <vmakarov@xxxxxxxxxx> writes:
>>
>> > I looked at this problem.  It looks like
>> >
>> > xmm0=call
>> > p666= xmm0
>> > ...
>> > insn in the question (spill failure because it needs xmm0)
>> > ...
>> > = p666, dead p666
>> >
>> > The combiner removes p666=xmm0 and uses xmm0 instead of p666 in the
>> > last insn.
>>
>> That sounds like a bad idea, particularly if SMALL_REGISTER_CLASSES or
>> FUNCTION_VALUE_REGNO_P (regno).
>
> Iff my hookizazion patch for SMALL_REGISTER_CLASSES would be approved,
> the problem would get worse.
>
> The problem here is that combine apparently does copy propagation of
> hard registers. That is a transformation we avoid like the plague
> everywhere else AFAIC (at least cse and cprop have guards against this
> or just do not handle hard regs at all).
>
> So my proposed solution would be: Do not allow combine to propagate
> SETany _SRC that contains hard regs.

At least not if that increases the number of uses of the hard reg.
If we can distinguish that case properly.

Richard.

> Ciao!
> Steven
>

<Prev in Thread] Current Thread [Next in Thread>