On Thu, Jun 18, 2009 at 12:23 PM, Steven Bosscher<[email protected]> wrote:
> On 6/18/09, Ian Lance Taylor <[email protected]> wrote:
>> Vladimir Makarov <[email protected]> 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.