This is the mail archive of the gcc-patches@gcc.gnu.org mailing list for the GCC project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

Re: PATCH: PR target/40470: unable to find a registe r to spill in class ‘SSE_FIRST_REG’


On Wed, Jun 17, 2009 at 12:25 PM, Vladimir Makarov<vmakarov@redhat.com> wrote:
> H.J. Lu wrote:
>>
>> On Wed, Jun 17, 2009 at 11:18 AM, Vladimir Makarov<vmakarov@redhat.com>
>> wrote:
>>
>>>
>>> I am agree with Jeff and Richard. ?There is one more reason to avoid
>>> using
>>> hard registers. ?Usage of hard registers tends to create more spill
>>> failures
>>> in reload.
>>>
>>
>> It is not like you have a choice here. The register for those insns is
>> fixed.
>> Sooner or later you have to allocate xmm0 for them.
>>
>>
>
> This is one simple example when usage a hard register could degrade
> performance.
>
> h0<-... (insn which has one alternative requiring a particular hard register
> h0)
>
> loop
>
> <-h0
>
> You can not use h0 in the loop if it is very hungry for registers like h0.
> ?If you used pseudo p0 instead of h0, IRA could spill p0 (put it int memory
> after the 1st insn) and restore it after the loop.
>
> So I'd never use hard register even in insn using only it. ?Using hard
> register also might result (through copy propagation) in even more hard
> register usage in insns and most of them do not require a particular hard
> register. ?So the problem I mentioned above would escalate more.
>

What happens when several insns inside loop which also
require h0? Don't you need to deal with h0 in loop in
any case?  I still like to see a real example.


-- 
H.J.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]